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

# Request an export of campaign events

> Request an asynchronous export of campaign or user journey events. Use the `export_id` in the response to retrieve the results.

> [!WARNING]
>
> **Paid API**
>
> This API incurs charges based on the amount of data requested. Contact Notifly for pricing.


## OpenAPI

````yaml /en/api-reference/openapi.yaml post /projects/{projectId}/campaign-event-data/exports
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly API server
security: []
tags:
  - name: catalog
    x-group: Catalogs
paths:
  /projects/{projectId}/campaign-event-data/exports:
    post:
      summary: create-campaign-event-export
      operationId: createCampaignEventExport
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: Project ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start
                - end
              properties:
                start:
                  type: string
                  format: date-time
                  description: Start time in UTC, in `yyyy-MM-ddTHH:mm:ss.sssZ` format.
                end:
                  type: string
                  format: date-time
                  description: >-
                    End time in UTC, in `yyyy-MM-ddTHH:mm:ss.sssZ` format. It
                    must be within one week of the start time.
                isMessageDataIncluded:
                  type: boolean
                  description: Whether to include message data. The default is `false`.
            example:
              start: '2025-06-01T00:00:00.000Z'
              end: '2025-06-07T23:59:59.999Z'
              isMessageDataIncluded: true
      responses:
        '200':
          description: The export request was accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  export_id:
                    type: string
                    description: Export job ID.
              example:
                export_id: xyz123
        '400':
          description: Invalid request parameters, such as an invalid date format or range.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InvalidRequest
                message: ...
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InternalServerError
                message: ...
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Pass the token issued by `POST /authenticate` as a bearer token.

````

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