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

# Retirer une étiquette

> Retirez une étiquette d’une conversation WhatsApp

### Endpoint

<ParamField method="POST" path="/v1/whatsapp/labels/remove" />

### Body Parameters

<ParamField body="accountId" type="string" required>
  Identifiant du compte WhatsApp.
</ParamField>

<ParamField body="labelId" type="string">
  Identifiant de l’étiquette à retirer. Fournissez `labelId` ou `labelName`.
</ParamField>

<ParamField body="labelName" type="string">
  Nom d’une étiquette existante lorsque son identifiant n’est pas connu.
</ParamField>

<ParamField body="conversationJid" type="string">
  JID complet de la conversation. Fournissez `conversationJid` ou `phone`.
</ParamField>

<ParamField body="phone" type="string">
  Numéro au format international lorsque le JID n’est pas connu.
</ParamField>

### Exemple

```bash theme={null}
curl -X POST https://api.wachap.com/v1/whatsapp/labels/remove \
  -H "Authorization: Bearer token" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "account_123",
    "labelId": "label_vip",
    "phone": "+2290100000000"
  }'
```

La réponse contient l’étiquette et un objet `assignment` avec `labeled: false`.


## OpenAPI

````yaml POST /whatsapp/labels/remove
openapi: 3.0.3
info:
  title: WaChap API
  version: 2.0.0
servers:
  - url: https://api.wachap.com/v1
    description: WaChap API server
security:
  - BearerAuth: []
tags:
  - name: Instances
    description: Créer et gérer des instances WhatsApp
  - name: Webhook
    description: Configuration des webhooks de réception
  - name: Messages
    description: Envoyer des messages WhatsApp
  - name: Comptes
    description: Gérer vos comptes WhatsApp connectés
  - name: SMS
    description: Service SMS de WaChap (V4) via FCM
  - name: Étiquettes WhatsApp
    description: Créer et associer des étiquettes aux conversations WhatsApp
paths:
  /whatsapp/labels/remove:
    post:
      tags:
        - Étiquettes WhatsApp
      summary: Retirer une étiquette d’une conversation
      operationId: removeWhatsAppLabel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accountId
              properties:
                accountId:
                  type: string
                labelId:
                  type: string
                labelName:
                  type: string
                conversationJid:
                  type: string
                chatJid:
                  type: string
                phone:
                  type: string
                to:
                  type: string
            example:
              accountId: account_123
              labelId: label_vip
              phone: '+2290100000000'
      responses:
        '200':
          description: Étiquette retirée ; assignment.labeled vaut false
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  label:
                    $ref: '#/components/schemas/WhatsAppLabel'
                  assignment:
                    $ref: '#/components/schemas/WhatsAppLabelAssignment'
        '404':
          description: LABEL_NOT_FOUND
        '409':
          description: APP_STATE_RESET_REQUIRED
components:
  schemas:
    WhatsAppLabel:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        accountId:
          type: string
        labelId:
          type: string
        name:
          type: string
        color:
          type: integer
        deleted:
          type: boolean
        createdAt:
          type: string
        updatedAt:
          type: string
        syncedAt:
          type: string
        fromSync:
          type: boolean
        source:
          type: string
    WhatsAppLabelAssignment:
      type: object
      properties:
        accountId:
          type: string
        labelId:
          type: string
        conversationJid:
          type: string
        phone:
          type: string
        labeled:
          type: boolean
        updatedAt:
          type: string
        syncedAt:
          type: string
        fromSync:
          type: boolean
        source:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````