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

# Ingest events

> Ingest events into Atlas. Events are processed asynchronously, so the response does not indicate when the events have been processed or that the data is correct. For example, if you send a customer ID that does not exist, this endpoint will accept it anyway.



## OpenAPI

````yaml https://platform.runonatlas.com/external/schema post /external/event/
openapi: 3.0.0
info:
  title: Atlas API
  version: 1.0.0
servers:
  - url: https://platform.runonatlas.com
security: []
paths:
  /external/event/:
    post:
      tags:
        - Events
      summary: Ingest events
      description: >-
        Ingest events into Atlas. Events are processed asynchronously, so the
        response does not indicate when the events have been processed or that
        the data is correct. For example, if you send a customer ID that does
        not exist, this endpoint will accept it anyway.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    customerId:
                      type: string
                      minLength: 1
                      description: >-
                        The Atlas customer ID. It must be the Atlas customer ID,
                        not your system's customer ID.
                      example: atlas-internal-customer-id-123
                    data:
                      type: object
                      properties: {}
                      additionalProperties:
                        nullable: true
                      description: >-
                        The event data. Used to report specific data about the
                        events that can be used to identify it or even compute
                        the usage.
                      example:
                        quantity: 10
                    eventName:
                      type: string
                      minLength: 1
                      description: >-
                        The event name. Together with `data`, it is used to
                        process the event. It is usually the `slug` of the
                        feature that generated the event.
                      example: api-usage
                    generatedAt:
                      type: string
                      description: The event generation date
                      example: '2022-01-01T00:00:00.000Z'
                    idempotencyKey:
                      type: string
                      minLength: 1
                      description: >-
                        The event idempotency key. Used to ensure that the event
                        is not processed multiple times. Each event must have a
                        unique idempotency key. If not provided, an idempotency
                        key will be automatically generated hashing the event
                        payload.
                      example: idempotency-key-123
                    userId:
                      type: string
                      nullable: true
                      description: The id of the user that generated the event
                      example: atlas-internal-user-id-123
                  required:
                    - customerId
                    - data
                    - eventName
                    - generatedAt
                  additionalProperties: false
                - type: array
                  items:
                    type: object
                    properties:
                      customerId:
                        type: string
                        minLength: 1
                        description: >-
                          The Atlas customer ID. It must be the Atlas customer
                          ID, not your system's customer ID.
                        example: atlas-internal-customer-id-123
                      data:
                        type: object
                        properties: {}
                        additionalProperties:
                          nullable: true
                        description: >-
                          The event data. Used to report specific data about the
                          events that can be used to identify it or even compute
                          the usage.
                        example:
                          quantity: 10
                      eventName:
                        type: string
                        minLength: 1
                        description: >-
                          The event name. Together with `data`, it is used to
                          process the event. It is usually the `slug` of the
                          feature that generated the event.
                        example: api-usage
                      generatedAt:
                        type: string
                        description: The event generation date
                        example: '2022-01-01T00:00:00.000Z'
                      idempotencyKey:
                        type: string
                        minLength: 1
                        description: >-
                          The event idempotency key. Used to ensure that the
                          event is not processed multiple times. Each event must
                          have a unique idempotency key. If not provided, an
                          idempotency key will be automatically generated
                          hashing the event payload.
                        example: idempotency-key-123
                      userId:
                        type: string
                        nullable: true
                        description: The id of the user that generated the event
                        example: atlas-internal-user-id-123
                    required:
                      - customerId
                      - data
                      - eventName
                      - generatedAt
                    additionalProperties: false
      responses:
        '200':
          description: The events have been accepted and will be processed asynchronously.
        '409':
          description: The event has already been ingested.
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        You can obtain this key from the Atlas dashboard. It must be of type
        `secret`

````