Chat
Create label
Creates a new label with a name and an optional color
POST
Create label
Auth:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
Description
Creates a label on the instance. Theid is allocated by the API (sequential) and then propagated to WhatsApp via app state, it may take 1 to 2 seconds to appear on the phone.
Examples
Minimum
Creates the label withname only, without color. The server assigns color: 0 by default and generates a sequential id returned in the response.
With color
Creates the “VIP” label using shade 5 of the WhatsApp Business palette viacolor: 5 (accepted range: 0 to 10), enabling visual differentiation between labels on the phone.
Success response
Thetag object carries the id generated by WhatsApp (use it in tags-assign/tags-unassign), the saved name, the applied color (0 when the client did not send it or sent it outside the 0–10 range), and the label type. deleted stays false on creations.
200 OK
Path parameters
Instance name.
Headers
| Name | Required | Example | Description |
|---|---|---|---|
Content-Type | yes | application/json | , |
token | yes (or Authorization) | a1b2c3d4-... | TokenAccount or TokenInstance. |
Request body
Label name. Cannot be empty after
TrimSpace.Label color. Accepts integers between
The values above reflect the current WhatsApp Business palette (it may change in future versions of the app, the index is stable, the actual shade is defined by the WhatsApp client). Values outside the
0 and 10, each index maps to a color from the native WhatsApp Business palette:color | Hex | Color |
|---|---|---|
0 | #ff9485 | Coral red |
1 | #64c4ff | Sky blue |
2 | #ffd429 | Golden yellow |
3 | #dfaef0 | Light lilac |
4 | #99b6c1 | Bluish gray |
5 | #55ccb3 | Mint green |
6 | #ff9dff | Pink |
7 | #d3a91d | Mustard |
8 | #6d7cce | Violet blue |
9 | #d7e752 | Lime green |
10 | #00d0e2 | Cyan |
0–10 range are silently normalized to 0.Error responses
| HTTP | error.message | When it happens |
|---|---|---|
| 400 | Instance name is required | Empty :instance. |
| 400 | Invalid request body: <...> | Malformed JSON. |
| 400 | Tag name is required | Empty name. |
| 401 | Invalid token | , |
| 404 | Instance not found | , |
| 503 | Instance is not connected to WhatsApp | , |
Error 400
Related
List labels
Confirm the newly created
id.Assign to a chat
Apply the label after creating it.