> ## Documentation Index
> Fetch the complete documentation index at: https://partner-api.xenda.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Estado de un envío

> Estado en vivo de la campaña y de cada destinatario (envío, entrega,
lectura y respuesta). Solo devuelve campañas creadas con tu API key.
Devuelve hasta 100 destinatarios.




## OpenAPI

````yaml /openapi.yaml get /campaigns/{campaign_id}
openapi: 3.1.0
info:
  title: Xenda Partner API
  version: 1.0.0
  description: |
    API para integraciones externas con la plataforma Xenda.
    Enviá templates de WhatsApp a través del módulo de campañas y recibí las
    respuestas de tus clientes por webhook, con un ID por envío y soporte de
    idempotencia para reintentos seguros.
servers:
  - url: https://api.automationhub.one/api:RIKjHOHm
    description: Producción
security:
  - ApiKeyAuth: []
paths:
  /campaigns/{campaign_id}:
    get:
      summary: Estado de un envío
      description: |
        Estado en vivo de la campaña y de cada destinatario (envío, entrega,
        lectura y respuesta). Solo devuelve campañas creadas con tu API key.
        Devuelve hasta 100 destinatarios.
      operationId: getCampaignStatus
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
          description: El `campaign_id` devuelto por `POST /campaigns`.
      responses:
        '200':
          description: Estado de la campaña.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignStatusResponse'
        '403':
          description: API key faltante o inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Campaña inexistente o no pertenece a esta API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    CampaignStatusResponse:
      type: object
      properties:
        campaign_id:
          type: string
        status:
          type: string
          description: '`draft`, `sending`, `sent`, `completed` o `failed`.'
        campaign_name:
          type: string
        external_ref:
          type: string
          nullable: true
        counts:
          type: object
          properties:
            total_recipients:
              type: integer
            pending:
              type: integer
            sent:
              type: integer
            failed:
              type: integer
            delivered:
              type: integer
            read:
              type: integer
            responded:
              type: integer
        recipients:
          type: array
          items:
            type: object
            properties:
              phone:
                type: string
              status:
                type: string
                description: '`pending`, `sent` o `failed`.'
              sent_at:
                type: string
                nullable: true
              delivered_at:
                type: string
                nullable: true
              read_at:
                type: string
                nullable: true
              responded_at:
                type: string
                nullable: true
              error_message:
                type: string
                nullable: true
    ApiError:
      type: object
      description: Formato único de error de la API.
      properties:
        code:
          type: string
          description: >-
            `ERROR_CODE_INPUT_ERROR` (400), `ERROR_CODE_ACCESS_DENIED` (403),
            `ERROR_CODE_NOT_FOUND` (404), `ERROR_CODE_STANDARD_ERROR` (500).
        message:
          type: string
          description: Descripción legible del error.
        payload:
          type: object
          description: >-
            Contexto extra. En errores de envío incluye `campaign_id` (si la
            campaña llegó a crearse antes del fallo) y `external_ref`.
          properties:
            campaign_id:
              type: string
              nullable: true
            external_ref:
              type: string
              nullable: true
      example:
        code: ERROR_CODE_INPUT_ERROR
        message: Template 'seguimiento_presupuesto' not found or not APPROVED.
        payload:
          campaign_id: null
          external_ref: null
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key provista por Xenda (formato `xnd_...`). Se envía en todas las
        llamadas.

````