Notifications
List proactive notifications for an agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Query Parameters
Filter by status (e.g. pending)
Filter by user ID
Max results (1-500)
50int641 <= value <= 500Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/notifications"{
"$schema": "/api/v1/schemas/ProactiveNotificationsResponse.json",
"notifications": [
{
"agent_id": "string",
"check_type": "string",
"consumed_at": "string",
"created_at": "string",
"generated_message": "string",
"intent": "string",
"message_id": "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"
}Get proactive notification history
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Query Parameters
Max results (1-500)
50int641 <= value <= 500Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/notifications/history"{
"$schema": "/api/v1/schemas/ProactiveNotificationsResponse.json",
"notifications": [
{
"agent_id": "string",
"check_type": "string",
"consumed_at": "string",
"created_at": "string",
"generated_message": "string",
"intent": "string",
"message_id": "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"
}Consume a proactive notification
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Proactive message ID to consume
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/notifications/string/consume"{
"$schema": "/api/v1/schemas/ConsumeNotificationOutputBody.json",
"success": true
}{
"$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"
}List pending notifications for a project
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Project UUID
Query Parameters
Filter by agent ID
Filter by event type
Max results
50int641 <= value <= 200Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/projects/string/notifications"{
"$schema": "/api/v1/schemas/ProjectNotificationsListOutputBody.json",
"count": 0,
"notifications": [
{
"acknowledged_at": "2019-08-24T14:15:22Z",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"event_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"notification_id": "string",
"payload": null,
"project_id": "string",
"status": "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"
}Acknowledge specific project notifications
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Project UUID
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/projects/string/notifications/acknowledge" \ -H "Content-Type: application/json" \ -d '{ "notification_ids": [ "string" ] }'{
"$schema": "/api/v1/schemas/AcknowledgeProjectNotificationsOutputBody.json",
"acknowledged": 0
}{
"$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"
}Acknowledge all pending project notifications
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Project UUID
Query Parameters
Scope to specific agent
Scope to specific event type
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/projects/string/notifications/acknowledge-all"{
"$schema": "/api/v1/schemas/AcknowledgeAllProjectNotificationsOutputBody.json",
"acknowledged": 0
}{
"$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"
}