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

Description

This endpoint allows you to update information of an existing label, such as its name and color.

URL Parameters

session
string
required
WhatsApp unique session ID
labelId
string
required
ID of the label to be updated

Request Body

name
string
required
New name of the label
color
number
required
New numeric code of the label color

Response

success
boolean
Indicates if the label was updated successfully
{
  "success": true,
  "label": {
    "id": "label123",
    "name": "Premium Clients",
    "color": 3
  }
}

Status Codes

  • 200 - Label updated successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized
  • 404 - Label not found

Usage Example

curl -X PUT https://api.wappfy.com.br/api/my-session/labels/label123 \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Clients",
    "color": 3
  }'

Authorizations

apikey
string
header
required

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

Path Parameters

labelId
string
required

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

200 - 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