> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Adicionar ou remover etiqueta

> Adiciona ou remove uma etiqueta em uma conversa do número identificado pelo parâmetro de caminho `{instance}`.



## OpenAPI

````yaml openapi.evolution-v2.pt.json POST /label/handleLabel/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Camada de API do Pilot Status — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Autentique com o header
    `apikey` (sua chave `ps_` do Pilot Status). Endpoints de instância/sessão
    NÃO estão disponíveis na camada.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Chamada e Business
  - name: Chat
  - name: Grupo
  - name: Etiqueta (Label)
  - name: Mensagem
  - name: Perfil
  - name: Configurações e Proxy
  - name: Armazenamento (S3)
  - name: Template
paths:
  /label/handleLabel/{instance}:
    post:
      tags:
        - Etiqueta (Label)
      summary: Adicionar ou remover etiqueta
      description: >-
        Adiciona ou remove uma etiqueta em uma conversa do número identificado
        pelo parâmetro de caminho `{instance}`.
      operationId: post__label_handleLabel_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: O nome de exibição do número no painel do Pilot Status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: >-
                    Número de telefone do destinatário em formato internacional
                    (não vazio).
                  example: '5511999999999'
                labelId:
                  type: string
                  description: Identificador da etiqueta a aplicar ou remover (não vazio).
                  example: '1'
                action:
                  type: string
                  description: Operação a executar; `add` ou `remove`.
                  example: add
              required:
                - number
                - labelId
                - action
      responses:
        '200':
          description: Sucesso — corpo de resposta nativo do provedor.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Result of adding or removing a label from a chat. The boolean
                  flag reflects the action performed: `add` is present for the
                  add action, `remove` for the remove action.
                properties:
                  numberJid:
                    type: string
                    description: >-
                      The WhatsApp JID of the chat the label was applied to or
                      removed from.
                  labelId:
                    type: string
                    description: The id of the label that was handled.
                  add:
                    type: boolean
                    description: >-
                      Present and true when the label was added to the chat
                      (action = add).
                  remove:
                    type: boolean
                    description: >-
                      Present and true when the label was removed from the chat
                      (action = remove).
                required:
                  - numberJid
                  - labelId
              example:
                numberJid: 5511999999999@s.whatsapp.net
                labelId: '18'
                add: true
        default:
          description: Erro — erro do provedor ou da camada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````