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

# Send a batch of events

> Send up to 100 events in one request. Always returns `202`, even when individual events fail, so inspect each entry in `results`.



## OpenAPI

````yaml /api-reference/openapi.json post /events/batch
openapi: 3.0.3
info:
  title: Onchain Suite API
  version: 1.0.0
  description: >-
    The server-to-server API. Authenticate with a secret (`sk_`) key and call
    these endpoints from your backend to register contacts, send events, message
    users, ingest consented captures, and feed automations. Secret keys are
    server-only: never ship one to a browser, a mobile app, or a public repo.
servers:
  - url: https://api.onchainsuite.com/api/v1
    description: Production
security:
  - secretKey: []
tags:
  - name: Contacts
    description: Register and list contacts.
  - name: Events
    description: Send product events that drive automations and segments.
  - name: Messaging
    description: Send in-app pushes and launch campaigns.
  - name: Forms
    description: Ingest consented captures from your backend.
  - name: Automation
    description: Feed trigger events into the automation runtime.
paths:
  /events/batch:
    post:
      tags:
        - Events
      summary: Send a batch of events
      description: >-
        Send up to 100 events in one request. Always returns `202`, even when
        individual events fail, so inspect each entry in `results`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - events
              properties:
                events:
                  type: array
                  maxItems: 100
                  items:
                    type: object
                    required:
                      - event
                      - contact
                    properties:
                      event:
                        type: string
                      contact:
                        $ref: '#/components/schemas/ContactRef'
      responses:
        '202':
          description: Accepted (check each result).
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        accepted:
                          type: boolean
                        deduplicated:
                          type: boolean
                        error:
                          type: string
components:
  schemas:
    ContactRef:
      type: object
      description: Who the event or action is for. Provide at least one identifier.
      properties:
        email:
          type: string
          format: email
        walletAddress:
          type: string
        externalId:
          type: string
          description: Your own user id.
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >-
        Your secret key, for example `sk_live_...`. Send it as `Authorization:
        Bearer sk_live_...`. A `sk_test_...` key runs in test mode.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.