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

# Logout WhatsApp Instance

> POST /v1/numbers/{id}/logout — Disconnect a WhatsApp instance without removing it from the database.



## OpenAPI

````yaml openapi.json POST /v1/numbers/{id}/logout
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/numbers/{id}/logout:
    post:
      tags:
        - Numbers
      summary: Logout WhatsApp instance
      description: >-
        Disconnects a WhatsApp instance (logout) without removing it from the
        database. This is different from DELETE which permanently removes the
        instance.
      operationId: post_numbers_id_logout
      parameters:
        - name: id
          in: path
          required: true
          description: WhatsApp instance id or WhatsApp number id.
          schema:
            type: string
          example: inst_01HZX...
      responses:
        '200':
          description: Logout successful
          content:
            application/json:
              example:
                ok: true
                instances:
                  - instanceId: inst_01HZX...
                    ok: true
        '400':
          description: Invalid payload or parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Validation error
        '401':
          description: Missing or invalid `x-api-key` / `x-api-key-id` header
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unauthorized
        '404':
          description: Number not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Number not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Too many requests
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````