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

# Label or unlabel a chat

> Apply or remove a label from a chat conversation



## OpenAPI

````yaml /openapi.yml post /chat/{chat_jid}/label
openapi: 3.0.0
info:
  title: WhatsApp API MultiDevice
  version: 6.9.0
  description: This API is used for sending whatsapp via API
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Initial Connection to Whatsapp server
  - name: user
    description: Getting information
  - name: send
    description: Send Message (Text/Image/File/Video).
  - name: message
    description: Message manipulation (revoke/react/update).
  - name: chat
    description: Chat conversations and messaging
  - name: group
    description: Group setting
  - name: newsletter
    description: newsletter setting
paths:
  /chat/{chat_jid}/label:
    post:
      tags:
        - chat
      summary: Label or unlabel a chat
      description: Apply or remove a label from a chat conversation
      operationId: labelChat
      parameters:
        - in: path
          name: chat_jid
          schema:
            type: string
          required: true
          description: >-
            Chat JID (e.g., phone@s.whatsapp.net for individual or groupid@g.us
            for group)
          example: 6289685028129@s.whatsapp.net
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                label_id:
                  type: string
                  example: label_123
                  description: Unique identifier for the label
                label_name:
                  type: string
                  example: Important
                  description: Display name for the label
                labeled:
                  type: boolean
                  example: true
                  description: Whether to apply (true) or remove (false) the label
              required:
                - label_id
                - label_name
                - labeled
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelChatResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '404':
          description: Chat Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  schemas:
    LabelChatResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Chat labeled successfully with label 'Important'
        results:
          type: object
          properties:
            status:
              type: string
              example: success
            message:
              type: string
              example: Chat labeled successfully with label 'Important'
            chat_jid:
              type: string
              example: 6289685028129@s.whatsapp.net
            label_id:
              type: string
              example: label_123
            labeled:
              type: boolean
              example: true
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP Status Code
        message:
          type: string
          example: field cannot be blank
          description: Detail error message
        results:
          type: object
          example: null
          description: additional data
    ErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          example: 401
          description: HTTP Status Code
        message:
          type: string
          example: Unauthorized access
          description: Detail error message
        results:
          type: object
          example: null
          description: additional data
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: HTTP Status Code
        message:
          type: string
          example: Chat not found
          description: Detail error message
        results:
          type: object
          example: null
          description: additional data
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: Detail error message
        results:
          type: object
          example: null
          description: additional data
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.