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

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

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

máx. 100 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 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"
  ]
}'
Respuesta
{
  "object": "list",
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "color": "string"
    }
  ]
}

¿Te ha resultado útil esta página?