Skip to main content
POST
/
api
/
{session}
/
labels
Create a new label
curl --request POST \
  --url https://{host}/api/{session}/labels \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "name": "Lead",
  "colorHex": "#ff9485",
  "color": null
}'
{
  "success": true,
  "label": {
    "id": "label123",
    "name": "VIP Clients",
    "color": 1
  }
}

Description

This endpoint allows you to create a new label to organize your chats. Labels are useful for categorizing chats by themes, priorities or any custom criteria.

URL Parameters

session
string
required
WhatsApp unique session ID

Request Body

label.id
string
Custom ID of the label (optional)
label.name
string
required
Name of the label
label.color
number
required
Numeric code of the label color

Response

success
boolean
Indicates if the label was created successfully
{
  "success": true,
  "label": {
    "id": "label123",
    "name": "VIP Clients",
    "color": 1
  }
}

Status Codes

  • 200 - Label created successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized

Usage Example

curl -X POST https://api.wappfy.com.br/api/my-session/labels \
  -H "Content-Type: application/json" \
  -d '{
    "label": {
      "name": "VIP Clients",
      "color": 1
    }
  }'

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

session
string
required

Session name (instanceName)

Body

application/json
name
string
required

Label name

Example:

"Lead"

colorHex
string

Color in hex

Example:

"#ff9485"

color
number

Color number, not hex

Example:

null

Response

201 - application/json
id
string
required

Label ID

Example:

"1"

name
string
required

Label name

Example:

"Lead"

color
number
required

Color number, not hex

Example:

0

colorHex
string
required

Color in hex

Example:

"#ff9485"

I