Send an event to a running session

POST /api/v1/code/sessions/{sessionId}/events on the Caveman Cloud control plane. Requires the code:write scope. Not exposed to autonomous agents: The Agents API is driven by a service account's code:run key, or by a person in the Code app and console. An agent connection works inside a Code session and never starts, lists or drives Code sessions or agents from a control-plane connection.

post/code/sessions/{sessionId}/events

Request

  • Base URL
    https://api.caveman.so/api/v1
  • URL
    https://api.caveman.so/api/v1/code/sessions/{sessionId}/events
  • Auth
    • OAuth 2
      Authorization code: /api/v1/oauth/authorize
      Token URL: /api/v1/oauth/token scopes: code:write
    • or HTTP bearer
    • or API key in cookie cave_access
    • or API key in cookie __Secure-cave_identity.session_token

Request body

request_idstring required
type'user.message' | 'user.interrupt' | 'user.approval' | 'user.answer' | 'user.tool_result' required
textstring
ask_idstring
decision'allow' | 'deny'
messagestring
contentstring
is_errorboolean

Response

The mail the event became

idstring uuid required
verb'task' | 'interrupt' | 'answer' required
authority'human' | 'api' | 'automation' required
channelstring required
to_workspace_idstring uuid nullable
bodystring
wakesboolean required
created_atstring date-time required
payloadobject

Changes

No recorded changes to this operation across all 1 revision of this API.