Skip to main content
SONZAI
Api

Wakeups

List scheduled wakeups for an agent

GET
/agents/{agentId}/wakeups
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Query Parameters

status?string

Filter by status (e.g. pending, executed)

limit?integer

Max results (1-500)

Default50
Formatint64
Range1 <= value <= 500

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/agents/string/wakeups"
{
  "$schema": "/api/v1/schemas/WakeupsResponse.json",
  "wakeups": [
    {
      "agent_id": "string",
      "check_type": "string",
      "created_at": "string",
      "event_description": "string",
      "executed_at": "string",
      "intent": "string",
      "interest_topic": "string",
      "last_topic": "string",
      "occasion": "string",
      "research_summary": "string",
      "scheduled_at": "string",
      "status": "string",
      "user_id": "string",
      "wakeup_id": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Schedule a wakeup for an agent

POST
/agents/{agentId}/wakeups
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/agents/string/wakeups" \  -H "Content-Type: application/json" \  -d '{    "check_type": "string",    "delay_hours": 0,    "intent": "string",    "user_id": "string"  }'
{
  "$schema": "/api/v1/schemas/ScheduleWakeupOutputBody.json",
  "scheduled_at": "string",
  "wakeup_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}