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

# Aampe Events Ingestion

> Handle an event coming from an Aampe Webhook.



## OpenAPI

````yaml /api-guide/ingestion-openapi.json post /v1/events
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://ingestion.{region}.api.aampe.com
    description: Aampe ingestion endpoint
    variables:
      region:
        enum:
          - europe-west3
          - asia-southeast1
          - us-east1
        default: us-east1
security:
  - BearerAuth: []
externalDocs:
  description: Full Aampe Ingestion API documentation
  url: >-
    https://kb.aampe.com/developer-guide/data-ingest/data-sources/streaming-aampe-api
paths:
  /v1/events:
    post:
      summary: Aampe Events Ingestion
      description: Handle an event coming from an Aampe Webhook.
      operationId: aampe_ingest_v1_events_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AampeWebhook'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
      externalDocs:
        description: Aampe Events Ingestion - stream events to Aampe
        url: https://kb.aampe.com/api-reference/aampe-ingest
components:
  schemas:
    AampeWebhook:
      properties:
        contact_id:
          type: string
          minLength: 1
          title: Contact Id
          description: User ID that is triggering the event
        event_name:
          type: string
          minLength: 1
          title: Event Name
          description: The name of the event that took place
        timestamp:
          type: number
          title: Timestamp
          description: >-
            Unix epoch seconds (number); decimals and millisecond values
            supported.
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
          description: Local timezone where the event took place
          default: UTC
        event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Id
          description: Optional unique ID of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Optional dictionary representing any extra metadata
      additionalProperties: false
      type: object
      required:
        - contact_id
        - event_name
        - timestamp
      title: AampeWebhook
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Ingestion API key. Obtain from Integrations > API keys in the Aampe
        Dashboard. See
        [Authentication](https://kb.aampe.com/api-guide/authentication) for
        details.

````