---
title: "Get a campaign"
method: GET
path: "/mailmerge/campaigns/{campaign_id}"
tags: ["Mail merge"]
---

# Get a campaign

`GET /mailmerge/campaigns/{campaign_id}`

## Request

- Base URL: `https://api.podpdf.com`
- URL: `https://api.podpdf.com/mailmerge/campaigns/{campaign_id}`
- Auth: API key in header `X-API-Key`

## Response `200`

The campaign

- object
  - `campaign` MailMergeCampaign
    - `campaign_id` string
    - `job_id` string
    - `status` 'draft' | 'queued' | 'processing' | 'completed' | 'partial_failed' | 'failed' | 'cancelled'
    - `name` string, nullable
    - `template_id` string
    - `template_name` string
    - `connection_id` string
    - `row_count` integer
    - `valid_row_count` integer
    - `invalid_row_count` integer
    - `duplicate_count` integer
    - `processed_count` integer
    - `sent_count` integer
    - `failed_count` integer
    - `rejected_count` integer
    - `unconfirmed_count` integer
    - `skipped_count` integer
    - `pages_total` integer
    - `report_available` boolean
    - `unsent_available` boolean: Rows that were not sent can be downloaded or sent again.
    - `unsent_count` integer
    - `unsent_summary` MailMergeUnsentSummary, nullable: Rows a finished campaign did not send, by reason. Null when every row was sent.
      - `failed` integer: The email could not be sent, or its PDF could not be made.
      - `not_attempted` integer: The campaign stopped or was cancelled first.
      - `rejected` integer: The mail server refused the address.
      - `unconfirmed` integer: The connection dropped after sending; the email may have arrived.
      - `invalid` integer: Invalid address or missing data. In the CSV only.
    - `outcome_counts` object, nullable: Once finished: how many rows ended each way, keyed by `sent` or the row's error code.
    - `retry_of` string, nullable: The campaign whose unsent rows this one sends.
    - `cancel_requested` boolean
    - `error_code` string, nullable
    - `error_message` string, nullable
    - `created_at` string, date-time
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `email_column` string
    - `mapping` object
    - `email` MailMergeEmail
      - `subject` string, required
      - `body_text` string, required: The plain-text part. `{{tokens}}` name template fields or columns (lowercased, other characters become `_`).
      - `body_html` string, nullable: Optional HTML part, sent as written; filled values are HTML-escaped.
      - `attachment_filename` string, nullable: Defaults to the template name; `.pdf` is added.
      - `list_unsubscribe` string, nullable: A `mailto:` or `https://` target for the List-Unsubscribe header.
      - `list_unsubscribe_one_click` boolean
    - `options` MailMergeOptions
      - `dedupe` boolean: Send once to an address that appears in several rows.

## Other responses

- `401`: Missing or invalid API key
- `403`: `INSUFFICIENT_CREDITS`, `CONVERSION_TYPE_NOT_ENABLED`, `PDF_TOOLS_NOT_ENABLED`, `RATE_LIMIT_EXCEEDED` or `ACCOUNT_NOT_FOUND`. Note that a plan's rate limit is a 403, not a 429.
- `404`: No such resource for this account

---

[API](https://skmtc.dev/podpdf/apis/podpdf-api.md) · [All operations](https://skmtc.dev/podpdf/apis/podpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/podpdf/apis/podpdf-api/revisions/84eb21f3ee27?raw)
