OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions138

Label → Create or Update

AI-generated

Summary

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.

Links

Discussion