POST /api/v1/forward/sessions/{session_id}/events
Adds input events to a session. Forward accepts user input events and controlled system input events; callers cannot forge agent or session status events.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Content-Type | Yes | application/json |
Idempotency-Key | No | Optional idempotency key for unsafe requests. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID. |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
events | array | Yes | Event objects to append. |
events[].type | string | Yes | Input Event type. |
events[].content | array | Conditional | Required for user.message and system.message; must be a non-empty content block array. |
events[].file_attachments | array | No | File attachment metadata for user.message. |
events[].tool_use_id | string | Conditional | Required for user.tool_confirmation and user.tool_result. |
events[].custom_tool_use_id | string | Conditional | Required for user.custom_tool_result. |
events[].result | string | Conditional | Required for user.tool_confirmation: allow or deny. |
events[].deny_message | string | No | Denial reason when result=deny. |
events[].description | string | Conditional | Required for user.define_outcome. |
events[].rubric | object | Conditional | Required for user.define_outcome. |
events[].reason | string | No | Interrupt reason for user.interrupt. |
events[].is_error | boolean | No | Error flag for tool result events. |
Allowed input event types
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
data | array | Created Event objects after Forward filtering. |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | invalid_event | Event type or fields are invalid. |
| 401 | authentication_error | authentication_required | PAT invalid or expired. |
| 404 | not_found_error | session_not_found | Session does not exist. |
| 409 | conflict_error | session_archived | Session is archived. |
| 409 | conflict_error | turn_already_running | Current turn does not allow a new turn. |
| 404 | not_found_error | pending_action_not_found | Tool confirmation or result has no matching pending action. |
| 409 | conflict_error | pending_action_already_resolved | Pending action was already resolved. |
Notes
system.messageis limited to one per request, must be the last event, and must followuser.message,user.tool_result, oruser.custom_tool_result.- The response uses the filtered Forward Event object and does not expose raw runtime event JSON.