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

# Ingest an event

> Ingest an event for trigger evaluation. Returns immediately with 202 Accepted.



## OpenAPI

````yaml /api-reference/workflows.yaml post /events/ingest
openapi: 3.1.0
info:
  title: Workflows
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /events/ingest:
    post:
      tags:
        - Events
      summary: Ingest an event
      description: >-
        Ingest an event for trigger evaluation. Returns immediately with 202
        Accepted.
      operationId: ingestEvent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestEventBody'
      responses:
        '202':
          description: Event accepted for processing
          content:
            application/json:
              schema:
                type: object
                properties:
                  eventId:
                    type: string
                    format: uuid
                required:
                  - eventId
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - message
                required:
                  - error
                  - details
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.workflows.events.ingest({ eventType:
            'x' });


            console.log(response.eventId);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.workflows.events.ingest(
                event_type="x",
            )
            print(response.event_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Workflows.Events.Ingest(context.TODO(), mobileruncloud.WorkflowEventIngestParams{\n\t\tEventType: \"x\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.EventID)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud workflows:events ingest \
              --api-key 'My API Key' \
              --event-type x
components:
  schemas:
    IngestEventBody:
      type: object
      properties:
        eventType:
          type: string
          minLength: 1
          maxLength: 256
        deviceId:
          type: string
          format: uuid
        payload:
          type: object
          additionalProperties: {}
          default: {}
      required:
        - eventType
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````