Actions164
- API Key Actions
- Automation Rule Actions
- Call Actions
- Catalog Actions
- Channel Actions
- Chat Actions
- Contact Actions
- Group Actions
- Add Participants
- Approve Membership Requests
- Create
- Delete Picture
- Demote Participants
- Get
- Get Invite Code
- Get Join Info
- Get Membership Requests
- Get Picture
- Get Settings
- Join
- Leave
- List
- Promote Participants
- Reject Membership Requests
- Remove Participants
- Revoke Invite Code
- Set Member Label
- Set Picture
- Update Description
- Update Settings
- Update Subject
- Label Actions
- Media Actions
- Message Actions
- Observability Actions
- Presence Actions
- Profile Actions
- Session Actions
- Status Actions
- System Actions
- Template Actions
- Webhook Actions
Label → Create or Update
AI-generatedSummary
Create a WhatsApp label or replace an existing label with the same caller-chosen ID. The write replaces the whole label, so include every field you want to keep.
Inputs
- Session Name or ID (required) — Select the session to use.
- Label ID (required) — Caller-chosen label ID. Reusing an existing ID rewrites that label.
- Fields (required) — Add at least one field: Name (label text, up to 100 characters) and/or Color (WhatsApp predefined color index from 0 to 19, not a hex value). On an existing label, omitted fields are not preserved; set both to retain both.
Output shape
A single item containing the API response for the created or replaced label.
Editing labels works on Baileys sessions; whatsapp-web.js returns 501 for this operation. Color is an index, while label reads return a hex string that cannot be converted back to that index.