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

# Create events in bulk

> Create multiple events for the authenticated client.



## OpenAPI

````yaml /openapi.json post /client/events/bulk
openapi: 3.0.1
info:
  title: MailerPath API
  description: This is the API for MailerPath, a service for managing and sending emails.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.38.0
servers:
  - url: https://api.mailerpath.com/api/v1
security: []
paths:
  /client/events/bulk:
    post:
      tags:
        - Events
      summary: Create events in bulk
      description: Create multiple events for the authenticated client.
      parameters:
        - name: sync
          in: query
          description: Process immediately and return per-item processing errors
          schema:
            type: boolean
        - name: processing_mode
          in: query
          description: Set to sync for immediate processing
          schema:
            type: string
      requestBody:
        description: Bulk event payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_api.BulkCreateEventsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/internal_api.APIResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/internal_api.BulkCreateEventResult
        '202':
          description: Accepted for asynchronous processing
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/internal_api.APIResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/internal_api.BulkCreateEventResult
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api.APIResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_api.APIResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    internal_api.BulkCreateEventsRequest:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/internal_api.CreateEventRequest'
    internal_api.APIResponse:
      type: object
      properties:
        data:
          type: object
        errors:
          type: array
          items:
            $ref: '#/components/schemas/internal_api.ValidationError'
        message:
          type: string
          example: Operation successful
        meta:
          type: object
        success:
          type: boolean
          example: true
    internal_api.BulkCreateEventResult:
      type: object
      properties:
        action:
          type: string
        contact_id:
          type: integer
        email:
          type: string
        error:
          type: string
        event_id:
          type: integer
        idempotency_key:
          type: string
        incoming_event_id:
          type: integer
        index:
          type: integer
        type:
          type: string
        uid:
          type: string
    internal_api.CreateEventRequest:
      type: object
      properties:
        action:
          type: string
        amount:
          type: number
        auto_create_contact:
          type: boolean
        email:
          type: string
          description: One of email or uid is required to identify the contact.
          example: user@example.com
        external_id:
          type: string
        feature:
          type: string
        idempotency_key:
          type: string
        metadata:
          type: object
          additionalProperties: true
        plan:
          type: string
        source:
          type: string
        status:
          type: string
        ts:
          type: string
        type:
          type: string
          example: purchase
        uid:
          type: string
          example: usr_abc123
        upgrade:
          type: boolean
    internal_api.ValidationError:
      type: object
      properties:
        condition:
          type: string
          example: format
        error:
          type: string
          example: Invalid email format
        key:
          type: string
          example: email
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: JWT Bearer token or raw API key via Authorization header
      name: Authorization
      in: header

````