> ## 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.

# Import Job

> Create a bulk import job to upload historical user, company, or event data from external systems.



## OpenAPI

````yaml POST /v1/imports
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.


    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://{environment}.userpilot.io
    description: >-
      Analytical data endpoint for Userpilot API. Choose the appropriate
      environment based on your data residency requirements and account type.
    variables:
      environment:
        description: >-
          The Userpilot environment endpoint for your account. Most customers
          use the default US region (analytex), while EU customers with data
          residency requirements use the EU region (analytex-eu). You can find
          your specific endpoint URL in your Userpilot dashboard under
          [Environment Settings](https://run.userpilot.io/environment).
        enum:
          - analytex
          - analytex-eu
        default: analytex
security: []
paths:
  /v1/imports:
    parameters: []
    post:
      summary: Request Data Import
      parameters:
        - name: Content-Type
          in: header
          required: false
          example: multipart/form-data
          schema:
            type: string
            default: multipart/form-data
        - name: Accept
          in: header
          required: false
          example: application/json
          schema:
            type: string
            default: application/json
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        content:
          multipart/form-data:
            example:
              file: path/to/data_import.csv
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV/NDJSON file containing user or company data to import
      responses:
        '200':
          headers:
            Content-Type:
              schema:
                type: string
                default: application/json
              example: application/json
          description: CSV - OK - Import job successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  end_time:
                    type: string
                  file_size:
                    type: string
                  filename:
                    type: string
                  job_id:
                    type: string
                  links:
                    type: string
                  start_time:
                    type: string
                  status:
                    type: string
                    enum:
                      - queued
                      - validating
                      - processing
                      - pending_refresh
                      - completed
                      - failed
                  total_rows:
                    type: string
        '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 - Import 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
        default: Token ABC_1234_EFGH_5678
      example: Token ABC_1234_EFGH_5678

````