Etiquetas

Set a chat's labels

PUT
/chats/{chatId}/labels

Replaces the whole set: labels not included are removed from the chat, and [] removes all of them. WhatsApp Business only: on a regular number, WhatsApp rejects it (422 etiquetas_indisponiveis).

Autorización

X-Api-Key: wpf_YOUR_KEY

The connection's API key (wpf_...), generated in the dashboard.

Authorization: Bearer wpf_YOUR_KEY

The same key in Authorization: Bearer wpf_... (what n8n, Make and HTTP libraries support out of the box).

Parámetros de ruta

chatId*string

The chat: the chat_id from GET /chats or from the webhooks (...@c.us, ...@lid, ...@g.us), or the phone number with country code and area code. Brazilian phone numbers are checked on WhatsApp, as when sending.

Parámetros de header

Idempotency-Key?string

Optional. Repeating the same value within 24 h, with the same API key, returns the first response without sending again. See Idempotency in the introduction.

Cuerpo de la petición

application/json
  1. body
labels*array<>

The ids of ALL labels the chat should have. Those not included are removed; [] removes all.

Elementositems <= 100

Cuerpo de la respuesta

The chat's labels now.

application/json
  1. response
data*
curl -X PUT 'https://app.wappfy.io/api/v1/chats/5581999999999/labels' \  -H 'X-Api-Key: wpf_YOUR_KEY' \  -H 'Content-Type: application/json' \  -d '{  "labels": [    "1",    "5"  ]}'
{  "data": {    "chat_id": "string",    "labels": [      "string"    ]  }}