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

Add labels to a thread

Puts 1-10 of the inbox’s labels on the thread and keeps the ones it has. If any label is unknown, nothing changes (404). Answers every label on the thread afterwards; one inbox.thread.labels.updated event reports the request.

POST/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

1-10 label IDs of the inbox

min. 1 Elemente · max. 10 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 POST '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?