Labels

Gerencie as etiquetas usadas para categorizar conversas na sua conta.

GET

Listar Labels

Retorna todas as labels da conta.

GET
https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels
Parâmetros de Path
account_id integer obrigatório
ID da conta.
CURL
curl --request GET \
  --url https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels \
  --header 'api_access_token: '
200
{
  "payload": [
    {"id": 1, "title": "urgente", "color": "#ff0000", "show_on_sidebar": true},
    {"id": 2, "title": "venda", "color": "#00ff00", "show_on_sidebar": true}
  ]
}
POST

Criar Label

Cria uma nova label.

POST
https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels
Parâmetros de Path
account_id integer obrigatório
ID da conta.
Body Parameters
title string obrigatório
Nome da label (sem espaços, use hífens).
color string obrigatório
Cor em hexadecimal. Ex: #ff0000
description string
Descrição da label.
show_on_sidebar boolean
Exibir na barra lateral. Padrão: true.
CURL
curl --request POST \
  --url https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels \
  --header 'api_access_token: ' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "pos-venda",
  "color": "#8b5cf6",
  "show_on_sidebar": true
}'
200
{
  "id": 3,
  "title": "pos-venda",
  "color": "#8b5cf6",
  "show_on_sidebar": true
}
PATCH

Atualizar Label

Atualiza uma label existente.

PATCH
https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels/{id}
Parâmetros de Path
account_id integer obrigatório
ID da conta.
id integer obrigatório
ID da label.
Body Parameters
title string
Novo nome da label.
color string
Nova cor em hexadecimal.
CURL
curl --request PATCH \
  --url https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels/{id} \
  --header 'api_access_token: ' \
  --header 'Content-Type: application/json' \
  --data '{
  "color": "#f59e0b"
}'
200
{
  "id": 3,
  "title": "pos-venda",
  "color": "#f59e0b"
}
DELETE

Excluir Label

Remove uma label da conta.

DELETE
https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels/{id}
Parâmetros de Path
account_id integer obrigatório
ID da conta.
id integer obrigatório
ID da label.
CURL
curl --request DELETE \
  --url https://chat.klivo.marketing/api/v1/accounts/{account_id}/labels/{id} \
  --header 'api_access_token: '
200
{
  "message": "Label deleted"
}