Skip to content
Esc
↑↓navigate↵open⌘Jpreview

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

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

max items 100
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 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"
  ]
}'
Response
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

Was this page helpful?