Write user or system input events to a Forward Session.
HTTP 200 OK
Request Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer <PAT> |
| Content-Type | Yes | application/json |
| Idempotency-Key | No | Optional idempotency key for requests with side effects. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
events | array | Yes | Array of event objects |
events[].type | string | Yes | Event type |
events[].content | string \ | array | Depends on type |
events[].content[].type | string | Yes | Content block type, e.g. text |
events[].content[].text | string | Yes | Text content |
content supports two formats:
- Shorthand: plain string
"content": "text content" - Full: content block array
"content": [{"type": "text", "text": "text content"}]
Supported Event Types
| type | Description | Required fields |
|---|---|---|
user.message | User sends a message | content |
user.interrupt | User interrupts Agent execution | - |
user.tool_confirmation | Authorize an Agent tool call | tool_use_id, decision (approve or deny) |
user.custom_tool_result | Return the execution result of a custom tool | tool_use_id, content |
user.define_outcome | User defines the expected outcome | content |
Example Request
Example Response
HTTP 200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of created Event objects, filtered by Forward rules. |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | invalid_event | Event type or fields are invalid. |
| 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 state does not allow starting 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. |
| 401 | - | TOKEN_INVALID | PAT invalid or expired, or Authorization header missing. |
Notes
-
Allowed input event types include
user.message,user.interrupt,user.tool_confirmation,user.tool_result,user.custom_tool_result,user.define_outcome, andsystem.message. -
system.messageis limited to one per request and must be the last event. - The response does not expose raw runtime event JSON.
- Session and Event data structure
- Query event history
- Subscribe to Session event stream