Zum Inhalt springen
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Set a thread's labels

Replaces the thread’s labels with exactly these (up to 100; [] takes them all off). The labels stay in the inbox. If any label is unknown, nothing changes (404). Answers every label on the thread afterwards.

PUT/inboxes/{inbox_id}/threads/{thread_id}/labels
Autorisierung
AuthorizationBearer-Token · headererforderlich

A BillionSend API key (bs_…).

Pfadparameter
inbox_idstringerforderlich

The inbox ID or its email address, such as support@example.com

thread_idstring<uuid>erforderlich

The thread ID

Request-Body
erforderlichapplication/json
labelsstring<uuid>[]erforderlich

Up to 100 label IDs of the inbox: exactly the labels the thread ends up with

max. 100 Elemente
Antworten
200

The labels on the thread

objectstringerforderlich
Erlaubt:list
dataobject[]erforderlich

Every label on the thread after the change

Eigenschaften anzeigen
Array von object
idstring<uuid>erforderlich
namestringerforderlich
colorstringerforderlich
401

Missing, malformed, unknown or revoked API key

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
404

Inbox, thread or label not found

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
422

Validation error

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
Ausprobieren
Server
Autorisierung
Parameter
Bodyapplication/json
Anfrage
curl -X PUT 'https://api.billionsend.com/inboxes/string/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/labels' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "labels": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}'
Antwort
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

War diese Seite hilfreich?