Skip to main content
Sessions

Send session events

Send supported user input events to a Forward session.

POST /api/v1/forward/sessions/{session_id}/events Adds supported user input events to a session. Callers cannot forge agent or session status events.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
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; must be a non-empty content block array. Only text and image types are supported.
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

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/forward/sessions/sess_xxx/events' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -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 or SAT 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

  • Allowed input types are user.message, user.interrupt, user.tool_confirmation, user.tool_result, user.custom_tool_result, and user.define_outcome.
  • The response uses the filtered Forward Event object and does not expose raw runtime event JSON.
Send session events - Qoder