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

# Export Job

> Create a bulk export job to extract user, company, or event data with customizable date ranges and filters.



## OpenAPI

````yaml POST /api/v1/analytics/exports
openapi: 3.0.0
info:
  title: Userpilot API
  version: 1.0.0
  termsOfService: https://userpilot.io/terms-of-service/
  description: >-
    Userpilot's API suite for user identification, event tracking, data
    import/export, and user/company management.


    Authentication:
     All endpoints that require authentication expect an HTTP header in the following format:

     Authorization: Token {{API_KEY}}

    Example (cURL):
     curl -X GET 'https://appex.userpilot.io/v1/identify' \
       -H 'Authorization: Token abcd1234efgh5678' \
       -H 'Content-Type: application/json'

    Contact Support:
     Email: support@userpilot.com
  contact:
    name: Userpilot
    url: https://userpilot.io
    email: support@userpilot.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://appex.userpilot.io
    description: Application endpoint
security: []
paths:
  /api/v1/analytics/exports:
    parameters:
      - $ref: '#/components/parameters/AuthorizationHeader'
    post:
      summary: Trigger an Export Job
      parameters:
        - name: Content-Type
          description: The content type of the request body. Must be `application/json`.
          in: header
          required: false
          example: application/json
          schema:
            type: string
        - name: Accept
          description: The content type of the response body. Must be `application/json`.
          in: header
          required: false
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                to:
                  type: string
                emails:
                  type: array
                  items:
                    type: string
                event_type:
                  type: array
                  items:
                    type: string
                user_id:
                  type: array
                  items:
                    type: string
                company_id:
                  type: array
                  items:
                    type: string
                segment_id:
                  type: string
                format:
                  type: string
                  enum:
                    - avro
                    - csv
                    - ndjson
                    - parquet
                exclusions:
                  type: string
      responses:
        '201':
          headers:
            Content-Type:
              schema:
                type: string
              example: application/json
          description: Created - Export job successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  environment_app_token:
                    type: string
                    description: The app token of the environment.
                    example: NX-RE213S2
                  environment_name:
                    type: string
                    description: The name of the environment.
                    example: production
                  job_id:
                    type: string
                    description: The ID of the export job.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  links:
                    type: string
                    description: The links to the export job.
                  start_time:
                    type: string
                    description: The start time of the export job.
        '401':
          headers:
            Content-Type:
              schema:
                type: string
              example: application/json
          description: Unauthorized - Invalid API key or insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        details:
                          type: string
                        error:
                          type: string
                        error_code:
                          type: string
                        message:
                          type: string
        '409':
          headers:
            Content-Type:
              schema:
                type: string
              example: application/json
          description: Conflict - Export job already in progress
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        details:
                          type: string
                        error:
                          type: string
                        error_code:
                          type: string
                        message:
                          type: string
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      description: >-
        API authentication token in the format: `Token {{API_KEY}}`. Obtain your
        API key from the [Userpilot Environment
        Settings](https://run.userpilot.io/environment).
      schema:
        type: string
      example: Token abcd1234efgh5678

````