Pular para o conteúdo
Esc
↑↓navegar↵abrir⌘Jpré-visualizar

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
Autorização
AuthorizationToken Bearer · headerobrigatório

A BillionSend API key (bs_…).

Parâmetros de caminho
inbox_idstringobrigatório

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

thread_idstring<uuid>obrigatório

The thread ID

Corpo da requisição
obrigatórioapplication/json
labelsstring<uuid>[]obrigatório

1-10 label IDs of the inbox

mín. 1 itens · máx. 10 itens
Respostas
200

The labels on the thread

objectstringobrigatório
Valores permitidos:list
dataobject[]obrigatório

Every label on the thread after the change

Mostrar propriedades
Array de object
idstring<uuid>obrigatório
namestringobrigatório
colorstringobrigatório
401

Missing, malformed, unknown or revoked API key

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
404

Inbox, thread or label not found

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
422

Validation error

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
429

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

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
Experimentar
Servidor
Autorização
Parâmetros
Corpoapplication/json
Requisição
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"
  ]
}'
Resposta
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

Esta página foi útil?