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

# List recent events

> List recent events across all missions



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/missions.yml get /ai/missions/events
openapi: 3.1.0
info:
  title: Telnyx AI Missions API
  version: 2.0.0
  description: >-
    API for tracking multi-step AI agent activities with missions, runs, plans,
    and events.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /ai/missions/events:
    get:
      tags:
        - Missions
      summary: List recent events
      description: List recent events across all missions
      operationId: get_public_missions_missions_events
      parameters:
        - name: type
          in: query
          required: false
          schema:
            title: Type
            type: string
        - name: page[number]
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number (1-based)
            default: 1
            title: Page[Number]
          description: Page number (1-based)
        - name: page[size]
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            exclusiveMinimum: 0
            description: Number of items per page
            default: 50
            title: Page[Size]
            minimum: 0
          description: Number of items per page
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

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

            // Automatically fetches more pages as needed.
            for await (const eventData of client.ai.missions.listEvents()) {
              console.log(eventData.event_id);
            }
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            page = client.ai.missions.list_events()
            page = page.data[0]
            print(page.event_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.AI.Missions.ListEvents(context.TODO(), telnyx.AIMissionListEventsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.ai.missions.MissionListEventsPage;
            import com.telnyx.sdk.models.ai.missions.MissionListEventsParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    MissionListEventsPage page = client.ai().missions().listEvents();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.ai.missions.list_events

            puts(page)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $page = $client->ai->missions->listEvents(
                pageNumber: 1, pageSize: 1, type: 'type'
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:missions list-events \
              --api-key 'My API Key'
components:
  schemas:
    EventsListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/EventData'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/Meta'
      type: object
      required:
        - data
        - meta
      title: EventsListResponse
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    EventData:
      properties:
        event_id:
          type: string
          title: Event Id
        run_id:
          type: string
          title: Run Id
        type:
          $ref: '#/components/schemas/EventType'
        summary:
          type: string
          title: Summary
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        step_id:
          title: Step Id
          type: string
        agent_id:
          title: Agent Id
          type: string
        payload:
          title: Payload
          additionalProperties: true
          type: object
        idempotency_key:
          title: Idempotency Key
          type: string
      type: object
      required:
        - event_id
        - run_id
        - type
        - summary
        - timestamp
      title: EventData
    Meta:
      properties:
        total_pages:
          type: integer
        total_results:
          type: integer
        page_number:
          type: integer
        page_size:
          type: integer
      type: object
      required:
        - total_pages
        - total_results
        - page_number
        - page_size
      title: Meta
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    EventType:
      type: string
      enum:
        - status_change
        - step_started
        - step_completed
        - step_failed
        - tool_call
        - tool_result
        - message
        - error
        - custom
      title: EventType
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````