Acontext
SessionSession_idEvents

Add event to session

POST
/session/{session_id}/events

Add a structured event to a session. Events are stored alongside messages and can be retrieved chronologically.

Authorization

BearerAuth
Authorization<token>

Project Bearer token (e.g., "Bearer sk-ac-xxxx")

In: header

Path Parameters

session_id*string

Session ID

Formatuuid

Request Body

application/json

AddEvent payload

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/session/497f6eca-6276-4993-bfeb-53cbbbba6f08/events" \  -H "Content-Type: application/json" \  -d '{}'
{
  "code": 0,
  "error": "string",
  "msg": "string",
  "data": {
    "created_at": "string",
    "data": {},
    "id": "string",
    "project_id": "string",
    "session_id": "string",
    "type": "string",
    "updated_at": "string"
  }
}
{
  "code": 0,
  "error": "string",
  "msg": "string"
}
{
  "code": 0,
  "error": "string",
  "msg": "string"
}