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

# Export Campaigns

> Export of every campaign: custom and blast campaigns, webinars, and field events. Each call returns one page; follow `pagination.nextCursor` until it is `null` to read the full set. Ad campaigns are not exported.

> **Request access.** This endpoint is not enabled by default, contact the Conversion team to request access. Calls from accounts without it return `403 export_not_enabled`.



## OpenAPI

````yaml /openapi.json post /v2/exports/campaigns
openapi: 3.1.0
info:
  title: Conversion API
  version: 2.0.0
  description: >-
    The Conversion API lets you programmatically manage contacts, track custom
    events, and manage their associated data.
servers:
  - url: https://pub-api.conversion.ai/api
security:
  - apiKey: []
paths:
  /v2/exports/campaigns:
    post:
      summary: Export Campaigns
      description: >-
        Export of every campaign: custom and blast campaigns, webinars, and
        field events. Each call returns one page; follow `pagination.nextCursor`
        until it is `null` to read the full set. Ad campaigns are not exported.


        > **Request access.** This endpoint is not enabled by default, contact
        the Conversion team to request access. Calls from accounts without it
        return `403 export_not_enabled`.
      operationId: exportCampaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                categories:
                  type: array
                  description: Only campaigns of these categories.
                  items:
                    type: string
                    enum:
                      - CUSTOM
                      - BLAST
                      - WEBINAR
                      - FIELD_EVENT
                campaignTypeIds:
                  type: array
                  description: Only campaigns of these campaign types. At most 100.
                  items:
                    type: string
                    format: uuid
                includeArchived:
                  type: boolean
                  description: Include archived rows. Defaults to `true`.
                cursor:
                  type: string
                  description: >-
                    The opaque cursor returned as `pagination.nextCursor` by a
                    previous call. Omit it on the first page. Send it without
                    filters, because the cursor carries them; sending both
                    returns `invalid_filter`.
                  examples:
                    - eyJ2IjoxLCJmIjp7fSwiayI6ImFiYyJ9
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 50
                  description: >-
                    The maximum number of rows per page. Defaults to 50. Values
                    are clamped to [1, 100].
            examples:
              all:
                summary: Every campaign
                value: {}
              webinars:
                summary: Active webinars only
                value:
                  categories:
                    - WEBINAR
                  includeArchived: false
      responses:
        '200':
          description: A page of campaigns retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - campaigns
                    properties:
                      campaigns:
                        type: array
                        description: The current page of campaigns.
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - category
                            - campaignTypeId
                            - archived
                            - createdAt
                            - updatedAt
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: The Conversion campaign ID.
                            name:
                              type: string
                              description: The campaign's name.
                            description:
                              type:
                                - string
                                - 'null'
                              description: The campaign's description.
                            category:
                              type: string
                              enum:
                                - CUSTOM
                                - BLAST
                                - WEBINAR
                                - FIELD_EVENT
                              description: The campaign's category.
                            campaignTypeId:
                              type: string
                              format: uuid
                              description: The campaign's type.
                            archived:
                              type: boolean
                              description: Whether the campaign is archived.
                            salesforceCampaignId:
                              type:
                                - string
                                - 'null'
                              description: The linked Salesforce campaign.
                            createdAt:
                              type: string
                              format: date-time
                              description: When the campaign was created.
                            updatedAt:
                              type: string
                              format: date-time
                              description: When the campaign was last updated.
                  pagination:
                    type: object
                    required:
                      - nextCursor
                    properties:
                      nextCursor:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Opaque cursor for the next page, or `null` when there
                          are no more results. A page can be short or empty
                          while the cursor is non-null.
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-cursor:
                  summary: Malformed cursor
                  value:
                    error:
                      code: invalid_cursor
                      message: invalid pagination cursor
                cursor-with-filters:
                  summary: Filters sent with a cursor
                  value:
                    error:
                      code: invalid_filter
                      message: >-
                        filters go on the first page only; the cursor carries
                        them
                invalid-category:
                  summary: Unsupported category
                  value:
                    error:
                      code: invalid_filter
                      message: invalid categories value "AD_CAMPAIGN"
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    error:
                      code: unauthorized
                      message: API key is required
        '403':
          description: The export API is not enabled for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                export-not-enabled:
                  summary: Export not enabled
                  value:
                    error:
                      code: export_not_enabled
                      message: business is not authorized to use the export API
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal:
                  summary: Internal error
                  value:
                    error:
                      code: internal_error
                      message: failed to list campaigns
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A machine-readable error code.
              examples:
                - invalid_email
            message:
              type: string
              description: A human-readable error description.
              examples:
                - 'invalid email format: not-an-email'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your Conversion API key. Found in **Settings > Integrations** in the
        dashboard. Format: `sk_live_<key_id>_<secret>`.

````

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