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

# Publicar una historia

> Publica una historia de WhatsApp (estado) de texto, imagen o video desde el número de la credencial. **Solo números Evolution GO**: los números de Meta Cloud API devuelven `400 NOT_SUPPORTED_FOR_META` y otras sesiones no oficiales (p. ej. Evolution v2) `400 NOT_SUPPORTED_FOR_PROVIDER`. Sin `recipients`, la privacidad de estados del teléfono decide quién la ve. Cada historia cuenta como **1 mensaje** una vez enviada. La historia dura 24 horas. Responde `202` con la historia en cola; `Idempotency-Key` hace que los reintentos devuelvan el mismo `id`. Envía `deliverAt` para programarla.

**Auth:** clave de número, o una clave de workspace/cuenta / token OAuth que indique el número en `x-whatsapp-number-id`. Las claves de cuenta y los tokens OAuth necesitan `messages:send`.



## OpenAPI

````yaml openapi.es.json POST /v1/stories
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/stories:
    post:
      tags:
        - Stories
      summary: Publicar una historia
      description: >-
        Publica una historia de WhatsApp (estado) de texto, imagen o video desde
        el número de la credencial. **Solo números Evolution GO**: los números
        de Meta Cloud API devuelven `400 NOT_SUPPORTED_FOR_META` y otras
        sesiones no oficiales (p. ej. Evolution v2) `400
        NOT_SUPPORTED_FOR_PROVIDER`. Sin `recipients`, la privacidad de estados
        del teléfono decide quién la ve. Cada historia cuenta como **1 mensaje**
        una vez enviada. La historia dura 24 horas. Responde `202` con la
        historia en cola; `Idempotency-Key` hace que los reintentos devuelvan el
        mismo `id`. Envía `deliverAt` para programarla.


        **Auth:** clave de número, o una clave de workspace/cuenta / token OAuth
        que indique el número en `x-whatsapp-number-id`. Las claves de cuenta y
        los tokens OAuth necesitan `messages:send`.
      operationId: post_stories
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Clave segura para reintentos: la misma clave devuelve la misma
            historia.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoryCreateRequest'
            examples:
              text:
                value:
                  type: text
                  text: Promoção hoje!
                  backgroundColor: '#25D366'
                  font: calistoga
                  recipients:
                    - '5511999999999'
              image:
                value:
                  type: image
                  mediaUrl: https://example.com/colecao.jpg
                  caption: Nova coleção
              scheduled:
                summary: Text, scheduled
                value:
                  type: text
                  text: Opening at 10!
                  deliverAt: '2026-11-12T10:00:00-03:00'
      responses:
        '202':
          description: Historia en cola
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - QUEUED
                  type:
                    type: string
                  recipients:
                    type: string
                    enum:
                      - explicit
                      - privacy
                  deliverAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Hora programada en UTC, o `null` cuando se publicó de
                      inmediato.
              example:
                id: cm3story0001
                status: QUEUED
                type: text
                recipients: explicit
                deliverAt: null
        '400':
          description: >-
            No compatible con este número, o cuerpo inválido
            (`NUMBER_NOT_FOUND`, `NOT_SUPPORTED_FOR_META`,
            `NOT_SUPPORTED_FOR_PROVIDER`, `VALIDATION_ERROR`)
          content:
            application/json:
              example:
                error: >-
                  Stories are not supported for Meta Cloud API numbers | Stories
                  não são suportados para números da Meta Cloud API
                code: NOT_SUPPORTED_FOR_META
        '401':
          description: Clave de API inválida
          content:
            application/json:
              example:
                error: Invalid API key
        '403':
          description: Credencial no permitida (`PERMISSION_DENIED`)
        '409':
          description: '`WHATSAPP_INSTANCE_NOT_CONNECTED`'
      security:
        - apiKey: []
        - apiKeyId: []
components:
  schemas:
    StoryCreateRequest:
      type: object
      required:
        - type
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - text
            - image
            - video
          description: Tipo de story.
        text:
          type: string
          minLength: 1
          maxLength: 700
          description: Obligatorio para `text`. De 1 a 700 caracteres.
        backgroundColor:
          type: string
          pattern: ^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$
          description: Solo `text`. Predeterminado `#128C7E`.
        textColor:
          type: string
          pattern: ^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$
          description: >-
            Solo `text`. Predeterminado `#FFFFFF`; cuando solo se envía
            `backgroundColor`, negro o blanco según el contraste. Si se envían
            ambos, se usan tal cual.
        font:
          type: string
          enum:
            - system
            - system_text
            - script
            - system_bold
            - morningbreeze
            - calistoga
            - exo2
            - courier
          default: system
          description: Solo `text`. Nombre de la fuente. Predeterminado `system`.
        mediaUrl:
          type: string
          description: >-
            Obligatorio para `image`/`video`. Una URL `https` pública, la única
            forma de pasar contenido multimedia (no existe `mediaId`). Hasta 100
            MiB; WebP se convierte a JPEG.
        caption:
          type: string
          maxLength: 1024
          description: Solo `image`/`video`. Hasta 1024 caracteres.
        recipients:
          type: array
          minItems: 1
          maxItems: 5000
          items:
            type: string
          description: >-
            De 1 a 5000 números de teléfono (E.164 sin `+`) o JIDs; más de 5000
            devuelve `400 VALIDATION_ERROR`. Si se omite, se usa la privacidad
            de estados del teléfono.
        deliverAt:
          type: string
          format: date-time
          description: >-
            Opcional. Fecha y hora ISO-8601 para publicar más tarde (mismas
            reglas que `deliverAt` en `/v1/messages/send`): se guarda en UTC,
            sin zona = UTC, pasado/ahora publica de inmediato, inválida devuelve
            `400 VALIDATION_ERROR`. El contenido multimedia se descarga en el
            momento de publicar. Cancela con `DELETE /v1/stories/{id}` mientras
            esté `QUEUED`.
  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.