Saltar al contenido
Esc
↑↓navegar↵abrir⌘Jvista previa

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
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Parámetros de ruta
inbox_idstringobligatorio

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

thread_idstring<uuid>obligatorio

The thread ID

Cuerpo de la solicitud
obligatorioapplication/json
labelsstring<uuid>[]obligatorio

1-10 label IDs of the inbox

mín. 1 elementos · máx. 10 elementos
Respuestas
200

The labels on the thread

objectstringobligatorio
Valores permitidos:list
dataobject[]obligatorio

Every label on the thread after the change

Mostrar propiedades
Array de object
idstring<uuid>obligatorio
namestringobligatorio
colorstringobligatorio
401

Missing, malformed, unknown or revoked API key

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
404

Inbox, thread or label not found

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

Validation error

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
429

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Parámetros
Cuerpoapplication/json
Solicitud
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"
  ]
}'
Respuesta
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

¿Te ha resultado útil esta página?