---
title: "Log event"
method: POST
path: "/ai/missions/{mission_id}/runs/{run_id}/events"
tags: ["Missions"]
---

# Log event

`POST /ai/missions/{mission_id}/runs/{run_id}/events`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/events`
- Auth: HTTP bearer

Logs a new event against the specified run and returns the created event. Events form the run's audit trail and can reference a plan step or agent.

## Path parameters

- `mission_id` string, uuid, required
- `run_id` string, uuid, required

## Request body

- CreateEventRequest
  - `type` 'status_change' | 'step_started' | 'step_completed' | 'step_failed' | 'tool_call' | 'tool_result' | 'message' | 'error' | 'custom', required
  - `summary` string, required
  - `step_id` string
  - `agent_id` string
  - `payload` object
  - `idempotency_key` string: Prevents duplicate events on retry

## Response `201`

Successful Response

- EventResponse
  - `data` EventData, required
    - `event_id` string, required
    - `run_id` string, required
    - `type` 'status_change' | 'step_started' | 'step_completed' | 'step_failed' | 'tool_call' | 'tool_result' | 'message' | 'error' | 'custom', required
    - `summary` string, required
    - `timestamp` string, date-time, required
    - `step_id` string
    - `agent_id` string
    - `payload` object
    - `idempotency_key` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) - [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/f82938f53ff4?raw)
