Api
Users
List users 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
limit?integer
Max users per page (default 100, max 500)
Default
100Format
int64offset?integer
Pagination offset
Default
0Format
int64sort_by?string
Sort field (display_name, last_interaction, created_at, user_id, or custom.)
sort_order?string
Sort order: asc or desc
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/users"{
"$schema": "/api/v1/schemas/UsersResponse.json",
"total": 0,
"users": [
{
"created_at": "string",
"display_name": "string",
"last_interaction_at": "string",
"metadata": {
"custom": {
"property1": "string",
"property2": "string"
},
"email": "string",
"phone": "string"
},
"mood": {
"affiliation": 0.1,
"agent_id": "string",
"arousal": 0.1,
"baseline_affiliation": 0.1,
"baseline_arousal": 0.1,
"baseline_tension": 0.1,
"baseline_valence": 0.1,
"created_at": "2019-08-24T14:15:22Z",
"label": "string",
"last_decay_at": "2019-08-24T14:15:22Z",
"last_interaction_at": "2019-08-24T14:15:22Z",
"tension": 0.1,
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string",
"valence": 0.1
},
"role": "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"
}Get current user with organizations
Authorization
bearerClerk AuthorizationBearer <token>
Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/me"{
"$schema": "/api/v1/schemas/MeResponse.json",
"email": "string",
"orgs": [
{
"created_at": "string",
"id": "string",
"member_count": 0,
"name": "string",
"role": "string",
"slug": "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"
}