> ## 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.

# Add or remove label

> Adds or removes a label on a chat for the number identified by the `{instance}` path parameter.



## OpenAPI

````yaml openapi.evolution-v2.json POST /label/handleLabel/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key). Instance/session endpoints
    are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Call & Business
  - name: Chat
  - name: Group
  - name: Label
  - name: Message
  - name: Profile
  - name: Settings & Proxy
  - name: Storage (S3)
  - name: Template
paths:
  /label/handleLabel/{instance}:
    post:
      tags:
        - Label
      summary: Add or remove label
      description: >-
        Adds or removes a label on a chat for the number identified by the
        `{instance}` path parameter.
      operationId: post__label_handleLabel_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: The number's display name in the Pilot Status dashboard.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: Recipient phone number in international format (non-empty).
                  example: '5511999999999'
                labelId:
                  type: string
                  description: Identifier of the label to apply or remove (non-empty).
                  example: '1'
                action:
                  type: string
                  description: Operation to perform; either `add` or `remove`.
                  example: add
              required:
                - number
                - labelId
                - action
      responses:
        '200':
          description: Success — provider-native response body.
          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: Error — provider or layer error.
          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>`.

````