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

# Ingest Events

> Send one or more events to Vela. Events are validated against their registered schema. Supports single event or batch of up to 100.



## OpenAPI

````yaml POST /ingest
openapi: 3.1.0
info:
  title: Vela API
  description: Event ingestion, schema management, and notification rules for Vela.
  version: 1.0.0
  contact:
    name: Vela Support
    email: support@vela.dev
servers:
  - url: https://api.vela.dev/v1
    description: Production
  - url: http://localhost:3000/v1
    description: Local development
security:
  - clientSecret: []
paths:
  /ingest:
    post:
      tags:
        - Events
      summary: Ingest Events
      description: >-
        Send one or more events to Vela. Events are validated against their
        registered schema. Supports single event or batch of up to 100.
      operationId: ingest-events
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/SingleEventInput'
                - $ref: '#/components/schemas/BatchEventInput'
            examples:
              single:
                summary: Single event
                value:
                  event: order.placed
                  data:
                    orderId: ord_abc123
                    amountCents: 4999
                  level: info
                  customer_id: cust_42
                  metadata:
                    env: production
              batch:
                summary: Batch (up to 100)
                value:
                  events:
                    - event: order.placed
                      data:
                        orderId: ord_1
                      level: info
                    - event: order.placed
                      data:
                        orderId: ord_2
                      level: info
      responses:
        '201':
          description: Events accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: integer
                    description: Number of events accepted
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
              example:
                accepted: 2
                events:
                  - id: evt-uuid-1
                    appId: app-uuid
                    event: order.placed
                    customer_id: null
                    data:
                      orderId: ord_1
                    level: info
                    metadata: {}
                    timestamp: '2024-06-01T12:00:00.000Z'
                    ingestedAt: '2024-06-01T12:00:00.123Z'
      security:
        - apiKey: []
components:
  schemas:
    SingleEventInput:
      type: object
      required:
        - event
        - data
        - level
      properties:
        event:
          type: string
          description: Event name (must match a registered schema)
        data:
          type: object
          description: Event payload (validated against schema)
        level:
          type: string
          enum:
            - info
            - warning
            - error
            - success
          description: Event severity level
        customer_id:
          type: string
          description: Customer identifier
        metadata:
          type: object
          description: Contextual data (validated against metadata fields)
        timestamp:
          type: string
          format: date-time
          description: ISO-8601 timestamp (defaults to now)
    BatchEventInput:
      type: object
      required:
        - events
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/SingleEventInput'
          maxItems: 100
          description: Array of events (up to 100)
    Event:
      type: object
      properties:
        id:
          type: string
          description: Event identifier
        appId:
          type: string
          format: uuid
        event:
          type: string
          description: Event name
        customer_id:
          type:
            - string
            - 'null'
          description: Customer identifier
        data:
          type: object
          description: Event payload
        level:
          type: string
          enum:
            - info
            - warning
            - error
            - success
        metadata:
          type: object
          description: Contextual metadata
        timestamp:
          type: string
          format: date-time
        ingestedAt:
          type: string
          format: date-time
  securitySchemes:
    clientSecret:
      type: http
      scheme: bearer
      description: 'Client secret for management API access. Format: `vela_cs_...`'
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API key for event ingestion. Format: `vela_live_...`'

````