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

# Import historical data

> Post data to the Collector for asynchronous processing

<Tip>Don't forget to [generate your access token](/api-references/account-login) to use this endpoint.</Tip>

The items array should contain the historical data you want to import. Each item will be queued and processed individually, and should respect the format of the [data schemas](/data-schemas/introduction).


## OpenAPI

````yaml POST /data
openapi: 3.0.1
info:
  title: Rimdian API reference
  description: >-
    Rimdian provides 2 apis: a Data Collector API to import data & a Server API
    to manage your workspace and settings.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: http://api-eu.rimdian.com
security: []
paths:
  /data:
    post:
      description: Post data to the Collector for asynchronous processing
      requestBody:
        description: Data import payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataImport'
        required: true
      responses:
        '200':
          description: Data import response
          content:
            text/plain:
              schema:
                type: string
                example: queued
        '500':
          description: internal server error
          content:
            text/plain:
              schema:
                type: string
                example: 'task error: ...'
      security:
        - bearerAuth: []
      servers:
        - url: http://collector-eu.rimdian.com
components:
  schemas:
    DataImport:
      required:
        - workspace_id
        - items
      type: object
      properties:
        workspace_id:
          description: Workspace ID
          type: string
        items:
          description: Array of 100 items max to import
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              kind:
                description: Kind of item
                type: string
          minItems: 1
          maxItems: 100
      example:
        workspace_id: acme_workspace
        items:
          - kind: user
            user:
              external_id: test_user_1
              is_authenticated: false
              created_at: '2024-01-01T00:00:00Z'
              updated_at: '2024-01-01T00:00:00Z'
              email: test@website.com
              first_name: John
              last_name: Doe
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````