Skip to main content
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

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
Content-TypeYesapplication/json
Idempotency-KeyNoOptional idempotency key for unsafe requests.

Path parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID.

Body parameters

ParameterTypeRequiredDescription
eventsarrayYesEvent objects to append.
events[].typestringYesInput Event type.
events[].contentarrayConditionalRequired for user.message and system.message; must be a non-empty content block array.
events[].file_attachmentsarrayNoFile attachment metadata for user.message.
events[].tool_use_idstringConditionalRequired for user.tool_confirmation and user.tool_result.
events[].custom_tool_use_idstringConditionalRequired for user.custom_tool_result.
events[].resultstringConditionalRequired for user.tool_confirmation: allow or deny.
events[].deny_messagestringNoDenial reason when result=deny.
events[].descriptionstringConditionalRequired for user.define_outcome.
events[].rubricobjectConditionalRequired for user.define_outcome.
events[].reasonstringNoInterrupt reason for user.interrupt.
events[].is_errorbooleanNoError flag for tool result events.

Allowed input event types

user.message
user.interrupt
user.tool_confirmation
user.tool_result
user.custom_tool_result
user.define_outcome
system.message

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/forward/sessions/sess_xxx/events' \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "type": "user.message",
        "content": [
          {
            "type": "text",
            "text": "Continue the analysis."
          }
        ],
        "file_attachments": []
      }
    ]
  }'

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "evt_xxx",
      "type": "user.message",
      "session_id": "sess_xxx",
      "content": [
        {
          "type": "text",
          "text": "Continue the analysis."
        }
      ],
      "processed_at": "2026-06-22T11:00:00Z"
    }
  ]
}

Response fields

FieldTypeDescription
dataarrayCreated Event objects after Forward filtering.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_eventEvent type or fields are invalid.
401authentication_errorauthentication_requiredPAT invalid or expired.
404not_found_errorsession_not_foundSession does not exist.
409conflict_errorsession_archivedSession is archived.
409conflict_errorturn_already_runningCurrent turn does not allow a new turn.
404not_found_errorpending_action_not_foundTool confirmation or result has no matching pending action.
409conflict_errorpending_action_already_resolvedPending action was already resolved.

Notes

  • system.message is limited to one per request, must be the last event, and must follow user.message, user.tool_result, or user.custom_tool_result.
  • The response uses the filtered Forward Event object and does not expose raw runtime event JSON.

List session events

Stream session events