Skip to main content
This endpoint is called by server-side middleware that intercepts in-domain requests made by agents. The SDK key identifies the project by calling UASAM to verify ownership, and the session token — a short-lived JWT issued at session creation — scopes the recorded event to a specific agent session. You do not call this endpoint directly from agent code; it is invoked automatically by the OTAS middleware installed in your backend framework.

Request

string
required
Backend SDK key for the project. Verified against UASAM before the event is stored.
string
required
Session JWT obtained from the session creation endpoint. Carries agent_session_id and agent_id claims.

Body

Required fields
string
required
UUID of the project this event belongs to.
string
required
The API path that was called (e.g. /api/v1/users/).
string
required
HTTP method of the request (e.g. GET, POST, PUT, DELETE).
number
required
HTTP response status code returned by the upstream service.
number
required
Round-trip latency of the request in milliseconds.
Optional fields
number
Size of the request payload in bytes.
number
Size of the response payload in bytes.
string
Serialized request headers (e.g. a JSON-encoded string of key-value pairs).
string
Raw or serialized request body.
string
Query string or serialized query parameters.
string
Form post data, if applicable.
string
Serialized response headers.
string
Raw or serialized response body.
string
Content-Type of the request (e.g. application/json).
string
Content-Type of the response.
object
Arbitrary JSON object for attaching user-defined metadata to the event.
string
Error message or identifier, if the request resulted in an error. Leave empty on success.
object
Additional JSON metadata for internal or debugging purposes.

Response

On success the endpoint returns HTTP 201 with an empty response object. Unlike the agent log endpoint, no event_id is returned here — the SDK log path does not expose the created record’s identifier.
number
required
1 on success, 0 on failure.
string
required
event_captured on success.
object
required
Empty object {}. No event ID is included.

Errors

When status_description is missing_required_fields, the response also includes a missing_fields array listing each absent field name.