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

> ## Agent Instructions
> Integrating Pilot Status end to end? Follow https://docs.pilotstatus.com.br/guides/integrate-with-ai.md (pt-BR: https://docs.pilotstatus.com.br/pt-BR/guides/integrate-with-ai.md). No step requires contacting support: every credential is shown in the dashboard or in an API response, and a lost one is regenerated, not recovered.
> Webhook signing secret: shown ONCE in the Signing secret window right after creating the webhook on /webhooks, and in the `secret` field of the POST /v1/webhooks response (MCP: webhooks_create). Lost it: Edit Webhook → Generate a new secret, POST /v1/webhooks/{id}/rotate-secret, or webhooks_rotate_secret (the old one stops working at once). Verify `x-pilot-status-signature` = hex HMAC-SHA256 of the raw request body keyed with that secret.
> Meta verify token (number connected with the user's own Meta app credentials): Meta Number Created! window after connecting, then the number's card on Numbers (workspace Owner), or webhook.verifyToken in the POST /v1/numbers/meta response. It is not the webhook signing secret.
> REST auth: `x-api-key: ps_...` header, never Authorization: Bearer. MCP: https://mcp.pilotstatus.com.br/mcp (148 tools, OAuth 2.1 or x-api-key); Code Mode: https://mcp.pilotstatus.com.br/code. Destructive MCP tools return a preview and a confirm_token: show the preview and call again only after the user's explicit yes. Over OAuth, revealing or creating ps_ API keys is workspace Owner only.

# Cancelar espera de activación

> Termina una solicitud de código que aún está `WAITING`, sin cuerpo, para que el próximo `POST /v1/phone-lines/{id}/activations` se acepte enseguida en lugar de responder `409 ACTIVATION_IN_PROGRESS` hasta que se cierre la ventana.

Responde `200` con la solicitud, ahora `TIMED_OUT` con `failureReason: "canceled_by_customer"`, enviada con `Cache-Control: no-store`. La línea deja de vigilarse para esa solicitud. Como toda solicitud que termina sin código, envía `phone_line.code_failed` y `phone_line.code_received` (con `code: null`) una vez, con `canceled_by_customer`.

**Una llamada que ya llegó nunca se descarta.** Una vez capturada la llamada, la solicitud deja de estar `WAITING`, y la cancelación responde `409 ACTIVATION_NOT_WAITING`: sigue consultando, se está leyendo su código. El mismo 409 responde a una solicitud que ya terminó. En ninguno de los dos casos cambia nada. `{id}` debe ser la línea a la que pertenece la solicitud: una línea que no está en tu workspace responde `404 LINE_NOT_FOUND`; una solicitud que no está en esa línea (o no está en tu workspace) responde `404 ACTIVATION_NOT_FOUND`.

**Requiere una clave con alcance de tenant**: una clave con alcance de número (o un permiso OAuth por número) recibe `403 NUMBER_SCOPE_NOT_ALLOWED`. Permiso `phone_lines:read`: con un token OAuth / MCP el usuario debe ser **Owner o Admin** (`403 PERMISSION_DENIED` en otro caso).



## OpenAPI

````yaml openapi.es.json POST /v1/phone-lines/{id}/activations/{activationId}/cancel
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: >-
    API REST pública de Pilot Status. Autentícate con el encabezado `x-api-key:
    ps_...` (o `x-api-key-id`). URL base: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/phone-lines/{id}/activations/{activationId}/cancel:
    post:
      tags:
        - Phone Lines
      summary: Cancelar una espera
      description: >-
        Termina una solicitud de código que aún está `WAITING`, sin cuerpo, para
        que el próximo `POST /v1/phone-lines/{id}/activations` se acepte
        enseguida en lugar de responder `409 ACTIVATION_IN_PROGRESS` hasta que
        se cierre la ventana.


        Responde `200` con la solicitud, ahora `TIMED_OUT` con `failureReason:
        "canceled_by_customer"`, enviada con `Cache-Control: no-store`. La línea
        deja de vigilarse para esa solicitud. Como toda solicitud que termina
        sin código, envía `phone_line.code_failed` y `phone_line.code_received`
        (con `code: null`) una vez, con `canceled_by_customer`.


        **Una llamada que ya llegó nunca se descarta.** Una vez capturada la
        llamada, la solicitud deja de estar `WAITING`, y la cancelación responde
        `409 ACTIVATION_NOT_WAITING`: sigue consultando, se está leyendo su
        código. El mismo 409 responde a una solicitud que ya terminó. En ninguno
        de los dos casos cambia nada. `{id}` debe ser la línea a la que
        pertenece la solicitud: una línea que no está en tu workspace responde
        `404 LINE_NOT_FOUND`; una solicitud que no está en esa línea (o no está
        en tu workspace) responde `404 ACTIVATION_NOT_FOUND`.


        **Requiere una clave con alcance de tenant**: una clave con alcance de
        número (o un permiso OAuth por número) recibe `403
        NUMBER_SCOPE_NOT_ALLOWED`. Permiso `phone_lines:read`: con un token
        OAuth / MCP el usuario debe ser **Owner o Admin** (`403
        PERMISSION_DENIED` en otro caso).
      operationId: post_phone_lines_id_activations_activationid_cancel
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: cmg5k2l1n0001pl8example9x
          description: >-
            La línea a la que pertenece la solicitud. Una solicitud que no está
            en esta línea responde `404 ACTIVATION_NOT_FOUND`.
        - name: activationId
          in: path
          required: true
          schema:
            type: string
          example: cmg5k3a7c0002ac8example4q
          description: >-
            El id de la solicitud de código (`activation.id`, devuelto por `POST
            /v1/phone-lines/{id}/activations`).
      responses:
        '200':
          description: >-
            Espera cancelada: la solicitud ahora está `TIMED_OUT` con
            `canceled_by_customer`. Se envía con `Cache-Control: no-store`.
          headers:
            Cache-Control:
              description: '`no-store`'
              schema:
                type: string
                enum:
                  - no-store
          content:
            application/json:
              schema:
                type: object
                properties:
                  activation:
                    type: object
                    properties:
                      id:
                        type: string
                        description: El id de la solicitud (`activationId`).
                      lineId:
                        type: string
                        description: La línea a la que pertenece la solicitud.
                      status:
                        type: string
                        enum:
                          - WAITING
                          - CAPTURED
                          - TRANSCRIBED
                          - TIMED_OUT
                          - FAILED
                        description: >-
                          `WAITING`, `CAPTURED`, `TRANSCRIBED`, `TIMED_OUT` o
                          `FAILED`. Sigue consultando mientras `status` sea
                          `WAITING`, o `CAPTURED` con `failureReason: null`;
                          cualquier otra combinación es definitiva.
                      requestedAt:
                        type: string
                        format: date-time
                        description: 'ISO 8601: cuándo se abrió la solicitud.'
                      pollDeadline:
                        type: string
                        format: date-time
                        description: >-
                          ISO 8601: fin de la ventana de captura, 5 minutos
                          después de la solicitud.
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          El código de 6 dígitos, una vez `TRANSCRIBED` y
                          encontrado. `null` en otro caso. **Una credencial**:
                          quien lo tenga puede registrar una cuenta de WhatsApp
                          en la línea.
                      capturedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: 'ISO 8601: cuándo se guardó la grabación de la llamada.'
                      transcribedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: 'ISO 8601: cuándo terminó la transcripción.'
                      failureReason:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Por qué una solicitud final no tiene código:
                          `no_call_in_window`, `canceled_by_customer`,
                          `no_code_in_transcript`, `transcription_failed`,
                          `audio_download_failed`, `audio_store_failed`,
                          `poll_not_scheduled`, o `null`. Trata un valor
                          desconocido como una falla, ya que pueden agregarse
                          nuevos.
                      hasAudio:
                        type: boolean
                        description: >-
                          Si hay una grabación de la llamada guardada: se
                          descarga desde `GET
                          /v1/phone-lines/activations/{activationId}/audio` y se
                          reproduce en el panel.
                    required:
                      - id
                      - lineId
                      - status
                      - requestedAt
                      - pollDeadline
                      - code
                      - capturedAt
                      - transcribedAt
                      - failureReason
                      - hasAudio
                required:
                  - activation
              example:
                activation:
                  id: cmg5k3a7c0002ac8example4q
                  lineId: cmg5k2l1n0001pl8example9x
                  status: TIMED_OUT
                  requestedAt: '2026-10-01T14:10:00.000Z'
                  pollDeadline: '2026-10-01T14:15:00.000Z'
                  code: null
                  capturedAt: null
                  transcribedAt: null
                  failureReason: canceled_by_customer
                  hasAudio: false
        '401':
          description: >-
            Encabezado `x-api-key` / `x-api-key-id` ausente o inválido (el
            cuerpo trae solo `error`)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Invalid API key
        '403':
          description: >-
            Clave con alcance de número o permiso OAuth por número
            (`NUMBER_SCOPE_NOT_ALLOWED`); token OAuth/MCP de un usuario que no
            es Owner ni Admin (`PERMISSION_DENIED`) o que ya no es miembro
            activo (`WORKSPACE_MEMBERSHIP_REQUIRED`); workspace archivado
            (`WORKSPACE_ARCHIVED`). `TENANT_REQUIRED`: credencial no vinculada a
            ningún workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                number_scope_not_allowed:
                  summary: Number-scoped key
                  value:
                    error: This endpoint requires a tenant-scoped API key
                    code: NUMBER_SCOPE_NOT_ALLOWED
                permission_denied:
                  summary: Role without phone_lines:read
                  value:
                    error: >-
                      Your workspace role does not allow this action
                      (phone_lines:read).
                    code: PERMISSION_DENIED
                workspace_membership_required:
                  summary: No longer a member
                  value:
                    error: >-
                      The user behind this token is not an active member of this
                      workspace.
                    code: WORKSPACE_MEMBERSHIP_REQUIRED
                workspace_archived:
                  summary: Archived workspace
                  value:
                    error: >-
                      This workspace has been archived and its API is closed. |
                      Este workspace foi arquivado e sua API está encerrada.
                    code: WORKSPACE_ARCHIVED
                tenantRequired:
                  summary: Credential not bound to a workspace
                  value:
                    error: This credential is not bound to a workspace.
                    code: TENANT_REQUIRED
        '404':
          description: >-
            `LINE_NOT_FOUND`: no existe esa línea en tu workspace;
            `ACTIVATION_NOT_FOUND`: no existe esa solicitud en esa línea de tu
            workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                line_not_found:
                  summary: Line not in your workspace
                  value:
                    error: Line not found. | Linha não encontrada.
                    code: LINE_NOT_FOUND
                activation_not_found:
                  summary: Request not on that line, or not in your workspace
                  value:
                    error: Code request not found. | Pedido de código não encontrado.
                    code: ACTIVATION_NOT_FOUND
        '409':
          description: >-
            `ACTIVATION_NOT_WAITING`: la llamada ya fue capturada (se está
            leyendo su código: sigue consultando) o la solicitud ya terminó. No
            cambió nada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  This code request is no longer waiting for the call: the call
                  was already captured, or the request already ended. | Este
                  pedido de código não está mais esperando a ligação: a ligação
                  já foi capturada ou o pedido já terminou.
                code: ACTIVATION_NOT_WAITING
        '500':
          description: Falla inesperada
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unexpected error. | Erro inesperado.
                code: INTERNAL_ERROR
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Tu API key ps_
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: Id de la API key (alternativa a x-api-key)

````

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