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

# List campaign mailings with the Marketing API

> Return json data about Paubox Marketing Campaign Emails



## OpenAPI

````yaml openapi2 GET /campaign_mailings
openapi: 3.0.3
info:
  title: Paubox Marketing API
  description: >
    Public documentation Paubox Marketing API. 


    All Paubox Marketing customers have access to the Paubox Marketing API to
    automate various tasks.


    ## Authentication

    Use the authorization header in requests with the format: `authorization:
    Token token=YOUR_API_KEY`


    Replace `YOUR_API_KEY` with your API key. Create one in Paubox under
    Settings > API Keys with the "Paubox Marketing" scope (note: each API key is
    displayed only once upon creation).


    ## Base URL

    `https://api.paubox.com/v1/marketing`
  contact:
    name: Paubox Support
    url: https://www.paubox.com
  version: 1.0.0
servers:
  - url: https://api.paubox.com/v1/marketing
    description: Production server
security:
  - TokenAuth: []
tags:
  - name: subscribers
    description: Subscriber management operations
  - name: analytics
    description: Campaign analytics and reporting operations
  - name: campaign_mailings
    description: Campaign mailing management and sending operations
  - name: drip_campaigns
    description: Drip campaign management and automation operations
  - name: subscription_lists
    description: Subscription list management operations
  - name: subscriptions
    description: Subscriber opt-in and opt-out operations
  - name: tracking_links
    description: Tracking link analytics and data operations
paths:
  /campaign_mailings:
    get:
      tags:
        - campaign_mailings
      summary: Fetch campaign mailings
      description: Return json data about Paubox Marketing Campaign Emails
      operationId: getCampaignMailings
      parameters:
        - name: search
          in: query
          description: Text to search for. Returns mailings whose subject contains it
          required: false
          schema:
            type: string
        - name: template_type
          in: query
          description: >-
            Return only mailings authored in this editor, for example `quill`,
            `bee` or `html`
          required: false
          schema:
            type: string
        - name: order_by
          in: query
          description: >-
            Attribute to sort on. Must be a campaign mailing column name, for
            example `subject` or `created_at`. When omitted, no explicit
            ordering is applied.
          required: false
          schema:
            type: string
        - name: order
          in: query
          description: Direction to sort. Only applied when `order_by` is supplied.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: items
          in: query
          description: Number of records to return per page
          required: false
          schema:
            maximum: 100
            minimum: 1
            type: integer
            default: 20
        - name: page
          in: query
          description: For pagination of results
          required: false
          schema:
            minimum: 1
            type: integer
            default: 1
        - name: pagination
          in: query
          description: >-
            Set to `false` to disable pagination and return every matching
            campaign mailing in one response.
          required: false
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Campaign mailings data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignMailingsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CampaignMailingsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CampaignMailingsResponse_data'
    CampaignMailingsResponse_data:
      type: object
      properties:
        id:
          type: string
          description: Campaign mailing ID
        type:
          type: string
          description: Resource type
          enum:
            - campaign_mailing
        attributes:
          $ref: '#/components/schemas/CampaignMailingsResponse_attributes'
    Error:
      type: object
      description: >-
        Shape used for authentication failures. Some endpoints report other
        errors differently; see each endpoint's description.
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
                description: HTTP status code and reason
                example: 401 Unauthorized
    CampaignMailingsResponse_attributes:
      type: object
      properties:
        subject:
          type: string
          description: Campaign mailing subject
        default_subject:
          type: string
          nullable: true
          description: Fallback subject used when no subject is set on a send
        template_type:
          type: string
          description: >-
            Editor the mailing was authored in, for example `quill`, `bee` or
            `html`
        created_at:
          type: string
          description: Creation timestamp
          format: date-time
        updated_at:
          type: string
          description: Last update timestamp
          format: date-time
        sent_count:
          oneOf:
            - type: integer
            - type: string
              enum:
                - N/A
          description: >-
            Number of emails sent. The string `N/A` when the recorded sent count
            is 0 but the mailing has deliveries.
        delivered_count:
          type: integer
          description: Number of emails delivered
        viewed_count:
          type: integer
          description: Number of emails viewed
        clicked_count:
          type: integer
          description: Number of emails clicked
        bounced_count:
          type: integer
          description: Number of emails bounced
        unsubscribed_count:
          type: integer
          description: Number of emails that resulted in unsubscribes
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    TokenAuth:
      type: apiKey
      description: >-
        Token-based authentication. Use format: "Token token=YOUR_API_KEY" where
        YOUR_API_KEY is your API key
      name: authorization
      in: header

````

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