> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get campaign

> Get a campaign.



## OpenAPI

````yaml /en/contacts-api/api-reference/openapi-contacts.json get /v1/campaigns/{campaignId}
openapi: 3.0.3
info:
  title: Notifique API Contatos, tags e audiência
  description: >-
    API para **CRUD de contatos**, **tags**, **tópicos**, **segmentos** e
    **campanhas** (template + audiência + canais).


    **Contato:** pelo menos um de **phone** ou **email** (únicos por workspace).
    **Idiomas:** `languages` é um array de códigos BCP-47 permitidos (lista em
    **`GET /v1/meta/contact-locales`**); ordem = prioridade. **Telegram:** use
    **`telegramLinks`** (`instanceId` + `peer`) para várias instâncias Telegram
    no mesmo workspace; **`telegramPeer`** permanece como atalho legado
    (preenche a ligação na **instância Telegram padrão** do workspace). Na
    campanha, o peer usado é o da **`telegramInstanceId`** da campanha (ou
    default), com *fallback* para `telegramPeer`.


    **Campanhas:** `channels` pode incluir `whatsapp`, `sms`, `email`,
    `telegram`. Cada canal listado deve estar **habilitado no template**.
    **`instanceId`** = WhatsApp; **`telegramInstanceId`** = Telegram.


    **WhatsApp cartão:** `POST /v1/whatsapp/messages` com `type: "contact"` e
    `payload.contactId`.


    **Autenticação:** `Authorization: Bearer sk_live_xxxxx` ou `x-api-key`.


    **Escopos:** `contacts:*`, `tags:*`, `topics:*`, `segments:*`, `campaigns:*`
    (inclui `campaigns:run`).


    **Campaign extras:** `POST .../cancel` (DRAFT/SCHEDULED), `GET .../stats`
    and `GET .../recipients` (update/read scopes). Run returns `runId`. WhatsApp
    Sending Pool: dashboard.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfContactBearerAuth: []
  - ntfContactApiKeyHeader: []
tags:
  - name: Contatos
    description: CRUD de contatos do workspace (phone ou email; tags)
  - name: Tags
    description: Tags (rótulos) para vincular a contatos
  - name: Tópicos
    description: Tópicos de comunicação (marketing / opt-in por tema)
  - name: Segmentos
    description: >-
      Segmentos de audiencia (DSL v1). Regras: tag, property, contactField,
      topic, receiveMarketing. Escopos segments:read|create|update|delete.
  - name: Campanhas
    description: Campanhas multicanal com template; execução via POST .../run
paths:
  /v1/campaigns/{campaignId}:
    get:
      tags:
        - Campanhas
      summary: Get campaign
      description: Get a campaign.
      operationId: ntfContact_getV1CampaignById
      parameters:
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfContact_CampaignOneResponse'
        '401':
          description: Erro
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfContact_ErrorResponse'
        '402':
          description: Erro
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfContact_ErrorResponse'
        '403':
          description: Erro
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfContact_ErrorResponse'
        '404':
          description: Erro
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfContact_ErrorResponse'
components:
  schemas:
    NtfContact_CampaignOneResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/NtfContact_Campaign'
    NtfContact_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: HTTP-style error label (e.g. Unauthorized, Bad Request, Not Found).
        message:
          type: string
          description: >-
            Human-readable message for end users (localized via Accept-Language
            / x-locale when applicable).
        code:
          type: string
          description: >-
            Stable API v1 code (enum). Always present on errors. Use with the
            HTTP status to decide retry or fix. See [Error
            responses](/en/guides/conceitos/resposta-de-erros).
      required:
        - success
        - error
        - message
        - code
    NtfContact_Campaign:
      type: object
      description: >-
        Multichannel campaign. **channels** ⊆ template enabled channels
        (`whatsapp`|`sms`|`email`|`telegram`). Status: DRAFT, SCHEDULED,
        RUNNING, COMPLETED, FAILED, CANCELLED.
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - SCHEDULED
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELLED
        templateId:
          type: string
          nullable: true
        channels:
          type: array
          items:
            $ref: '#/components/schemas/NtfContact_CampaignChannel'
          description: Subconjunto dos canais ativos no template.
        segmentId:
          type: string
          nullable: true
        audienceContactIds:
          type: array
          items:
            type: string
          nullable: true
        scheduledFor:
          type: string
          format: date-time
          nullable: true
        instanceId:
          type: string
          nullable: true
          description: Instância **WhatsApp** usada quando `whatsapp` ∈ channels.
        telegramInstanceId:
          type: string
          nullable: true
          description: Instância **Telegram** (bot) usada quando `telegram` ∈ channels.
        fromEmail:
          type: string
          nullable: true
        variables:
          type: object
          additionalProperties: true
          nullable: true
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        audienceCount:
          type: integer
          nullable: true
          description: Contacts in the last run
        lastRunAt:
          type: string
          format: date-time
          nullable: true
    NtfContact_CampaignChannel:
      type: string
      description: >-
        Campaign channel (create/update): `whatsapp`, `sms`, `email`,
        `telegram`. Must be a subset of channels enabled on the template.
        Templates may enable RCS/Push/voice; campaign create via API/dashboard
        uses these four.
      enum:
        - whatsapp
        - sms
        - email
        - telegram
  securitySchemes:
    ntfContactBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Authorization: Bearer sk_live_xxxxx'
    ntfContactApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'x-api-key: sk_live_xxxxx'

````