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

# Retrieve a campaign

> Returns one of your campaigns: its message, options, and row counts. It never includes recipient data from the CSV file. A campaign from the other mode returns `404`. Requires the `campaigns:read` ability.



## OpenAPI

````yaml /en/openapi.yaml get /api/campaigns/{id}
openapi: 3.1.0
info:
  title: Paperjoy API
  version: '2026-10-19'
  description: >-
    Create, preview, and track real handwritten postcards. The API key decides
    whether a request runs in test or live mode.
  termsOfService: https://paperjoy.co/regulamin
  license:
    name: Proprietary
    url: https://paperjoy.co/regulamin
servers:
  - url: https://paperjoy.co
security:
  - bearerAuth: []
tags:
  - name: Account
    description: The authenticated account and its credit balance.
  - name: Postcards
    description: Create, preview, list, and retrieve postcards.
  - name: Signatures
    description: Custom handwritten signatures available to your organization.
  - name: Designs
    description: Printed card fronts, ready-made and your own.
  - name: Campaigns
    description: CSV campaigns created in the Paperjoy app, read-only.
paths:
  /api/campaigns/{id}:
    get:
      tags:
        - Campaigns
      summary: Retrieve a campaign
      description: >-
        Returns one of your campaigns: its message, options, and row counts. It
        never includes recipient data from the CSV file. A campaign from the
        other mode returns `404`. Requires the `campaigns:read` ability.
      operationId: getCampaign
      parameters:
        - $ref: '#/components/parameters/CampaignId'
      responses:
        '200':
          description: The campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignResponse'
              example:
                data:
                  id: cmp_4kQ9xW2mTb
                  test_mode: false
                  status: completed
                  file_name: klienci-wiosna.csv
                  message: |-
                    Hello {{imie}}!
                    This spring, get 10% off with the code {{kod_rabatowy}}.
                  font_id: font-1
                  mistake: true
                  signature: Marta from the Linden Florist
                  signature_id: null
                  counts:
                    rows: 12
                    invalid: 0
                    skipped: 1
                    postcards: 11
                  completed_at: '2026-11-17T15:02:00+00:00'
                  created_at: '2026-11-17T14:40:00+00:00'
                  updated_at: '2026-11-17T15:02:00+00:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CampaignId:
      name: id
      in: path
      required: true
      description: >-
        The campaign ID, from the campaign list or the campaign's address in the
        Paperjoy app.
      schema:
        type: string
        examples:
          - cmp_4kQ9xW2mTb
  schemas:
    CampaignResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Campaign'
    Campaign:
      type: object
      description: >-
        A CSV campaign. It never includes the file's columns or rows, which hold
        recipient data.
      required:
        - id
        - test_mode
        - status
        - file_name
        - message
        - font_id
        - mistake
        - signature
        - signature_id
        - counts
        - completed_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          examples:
            - cmp_4kQ9xW2mTb
        test_mode:
          type: boolean
          description: >-
            `true` for a test campaign. Its postcards are free and never written
            or mailed.
        status:
          $ref: '#/components/schemas/CampaignStatus'
        file_name:
          type: string
          description: The uploaded file name.
          examples:
            - klienci-wiosna.csv
        message:
          type:
            - string
            - 'null'
          description: >-
            The card message with variables such as `{{imie}}`, shared by the
            whole campaign. `null` until you save the message step.
        font_id:
          description: The handwriting font, or `null` before the message step is saved.
          oneOf:
            - $ref: '#/components/schemas/FontId'
            - type: 'null'
        mistake:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the cards have a crossed-out word. `null` before the message
            step is saved.
        signature:
          type:
            - string
            - 'null'
          description: The typed signature, or `null`.
        signature_id:
          type:
            - string
            - 'null'
          description: The campaign's custom signature, or `null`.
          examples:
            - sig_ZeXOkSQjTp
        design_id:
          type:
            - string
            - 'null'
          description: The campaign's printed front, or `null` for a blank front.
          examples:
            - wz_7Hs1Qa
        counts:
          type: object
          description: The file's rows by state.
          required:
            - rows
            - invalid
            - skipped
            - postcards
          properties:
            rows:
              type: integer
              minimum: 0
              description: Data rows in the file.
            invalid:
              type: integer
              minimum: 0
              description: Rows waiting for a fix.
            skipped:
              type: integer
              minimum: 0
              description: Skipped rows, which never become postcards.
            postcards:
              type: integer
              minimum: 0
              description: Postcards created on confirmation. `0` before confirmation.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the campaign was confirmed. `null` until the status changes to
            `completed`.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    CampaignStatus:
      type: string
      description: >-
        The campaign's step: `mapping` (column mapping), `content` (card
        message), `validation` (row checks), `confirmation` (awaiting
        confirmation), or `completed` (postcards created).
      enum:
        - mapping
        - content
        - validation
        - confirmation
        - completed
    FontId:
      type: string
      enum:
        - font-1
        - font-2
      description: >-
        `font-1` is clear, rounded handwriting. `font-2` is a faster, joined-up
        cursive.
  responses:
    Unauthorized:
      description: The API key is missing, invalid, revoked, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthenticated.
    Forbidden:
      description: >-
        The API key lacks the required ability, or the resource belongs to
        someone else.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: This action is unauthorized.
    NotFound:
      description: The resource does not exist or belongs to the other mode.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Not found.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Paperjoy API key. Keys starting with `pj_test_` use test mode; keys
        starting with `pj_live_` use live mode.

````

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