Api
Diary
Get diary entries for an agent
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
date?string
Fetch a single entry by date (YYYY-MM-DD). Mutually exclusive with limit.
limit?string
Maximum number of recent entries to return (default 30, max 100)
user_id?string
Optional user ID to filter entries
instance_id?string
Optional instance ID for scoping
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/diary"{
"$schema": "/api/v1/schemas/DiaryPolymorphicResponse.json",
"entries": [
{
"agent_id": "string",
"body_lines": [
"string"
],
"content": "string",
"created_at": "2019-08-24T14:15:22Z",
"date": "string",
"entry_id": "string",
"mood": "string",
"tags": [
"string"
],
"title": "string",
"topics": [
"string"
],
"trigger_type": "string",
"user_id": "string"
}
],
"entry": {
"agent_id": "string",
"body_lines": [
"string"
],
"content": "string",
"created_at": "2019-08-24T14:15:22Z",
"date": "string",
"entry_id": "string",
"mood": "string",
"tags": [
"string"
],
"title": "string",
"topics": [
"string"
],
"trigger_type": "string",
"user_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"
}