Skip to content
Esc
↑↓navigate↵open⌘Jpreview

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
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Path parameters
inbox_idstringrequired

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

thread_idstring<uuid>required

The thread ID

Request body
requiredapplication/json
labelsstring<uuid>[]required

1-10 label IDs of the inbox

min items 1 · max items 10
Responses
200

The labels on the thread

objectstringrequired
Allowed:list
dataobject[]required

Every label on the thread after the change

Show properties
Array of object
idstring<uuid>required
namestringrequired
colorstringrequired
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
404

Inbox, thread or label not found

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error

statusCodenumberrequired
namestringrequired
messagestringrequired
429

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

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
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"
  ]
}'
Response
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

Was this page helpful?