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

# Publish a story

> Publishes a WhatsApp story (status) of text, image or video from the credential's number. **Evolution GO numbers only** — Meta Cloud API numbers return `400 NOT_SUPPORTED_FOR_META`, other unofficial sessions (e.g. Evolution v2) `400 NOT_SUPPORTED_FOR_PROVIDER`. Without `recipients`, the phone's status privacy decides who sees it. Each story counts as **1 message** once sent. The story lives 24 hours. Answers `202` with the story queued; `Idempotency-Key` makes retries return the same `id`. Send `deliverAt` to schedule it.

**Auth:** number key, or a workspace/account key / OAuth token naming the number in `x-whatsapp-number-id`. Account keys and OAuth tokens need `messages:send`.



## OpenAPI

````yaml openapi.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: >-
    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/stories:
    post:
      tags:
        - Stories
      summary: Publish a story
      description: >-
        Publishes a WhatsApp story (status) of text, image or video from the
        credential's number. **Evolution GO numbers only** — Meta Cloud API
        numbers return `400 NOT_SUPPORTED_FOR_META`, other unofficial sessions
        (e.g. Evolution v2) `400 NOT_SUPPORTED_FOR_PROVIDER`. Without
        `recipients`, the phone's status privacy decides who sees it. Each story
        counts as **1 message** once sent. The story lives 24 hours. Answers
        `202` with the story queued; `Idempotency-Key` makes retries return the
        same `id`. Send `deliverAt` to schedule it.


        **Auth:** number key, or a workspace/account key / OAuth token naming
        the number in `x-whatsapp-number-id`. Account keys and OAuth tokens need
        `messages:send`.
      operationId: post_stories
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: 'Retry-safe key: the same key returns the same story.'
      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: Story queued
          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: >-
                      Scheduled time in UTC, or `null` when published right
                      away.
              example:
                id: cm3story0001
                status: QUEUED
                type: text
                recipients: explicit
                deliverAt: null
        '400':
          description: >-
            Not supported for this number, or invalid body (`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: Invalid API key
          content:
            application/json:
              example:
                error: Invalid API key
        '403':
          description: Credential not allowed (`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: Story kind.
        text:
          type: string
          minLength: 1
          maxLength: 700
          description: Required for `text`. 1–700 characters.
        backgroundColor:
          type: string
          pattern: ^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$
          description: '`text` only. Default `#128C7E`.'
        textColor:
          type: string
          pattern: ^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$
          description: >-
            `text` only. Default `#FFFFFF`; when only `backgroundColor` is sent,
            black or white by contrast. Both sent → used as is.
        font:
          type: string
          enum:
            - system
            - system_text
            - script
            - system_bold
            - morningbreeze
            - calistoga
            - exo2
            - courier
          default: system
          description: '`text` only. Font name. Default `system`.'
        mediaUrl:
          type: string
          description: >-
            Required for `image`/`video`. A public `https` URL — the only way to
            pass media (there is no `mediaId`). Up to 100 MiB; WebP is converted
            to JPEG.
        caption:
          type: string
          maxLength: 1024
          description: '`image`/`video` only. Up to 1024 characters.'
        recipients:
          type: array
          minItems: 1
          maxItems: 5000
          items:
            type: string
          description: >-
            1 to 5000 phone numbers (E.164 without `+`) or JIDs; more than 5000
            → `400 VALIDATION_ERROR`. Left out → the phone's status privacy.
        deliverAt:
          type: string
          format: date-time
          description: >-
            Optional. ISO-8601 date-time to publish later (same rules as
            `deliverAt` on `/v1/messages/send`): stored in UTC, no zone = UTC,
            past/now publishes right away, invalid → `400 VALIDATION_ERROR`. The
            media is downloaded at publish time. Cancel with `DELETE
            /v1/stories/{id}` while `QUEUED`.
  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)

````

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