Goals
List breakthroughs 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
Optional user ID to scope breakthroughs
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/breakthroughs"{
"$schema": "/api/v1/schemas/BreakthroughsResponse.json",
"breakthroughs": [
{
"achieved_goals": [
"string"
],
"acknowledged": true,
"agent_id": "string",
"breakthrough_id": "string",
"breakthrough_number": 0,
"created_at": "2019-08-24T14:15:22Z",
"level_at_breakthrough": 0,
"narrative": "string",
"new_goals": [
"string"
],
"personality_shifts": [
"string"
],
"skill_points_awarded": 0,
"trait_evolved": "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"
}List goals 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
Optional user ID to scope goals
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/goals"{
"$schema": "/api/v1/schemas/GoalsResponse.json",
"goals": [
{
"$schema": "/api/v1/schemas/Goal.json",
"achieved_at": "2019-08-24T14:15:22Z",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"goal_id": "string",
"priority": 0,
"related_traits": [
"string"
],
"status": "string",
"title": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z",
"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"
}Create a goal for an agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
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/goals" \ -H "Content-Type: application/json" \ -d '{}'{
"$schema": "/api/v1/schemas/Goal.json",
"achieved_at": "2019-08-24T14:15:22Z",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"goal_id": "string",
"priority": 0,
"related_traits": [
"string"
],
"status": "string",
"title": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z",
"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"
}Delete (abandon) a goal
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Goal identifier
Query Parameters
Optional user ID for per-user goals
Response Body
application/problem+json
curl -X DELETE "https://loading/api/v1/agents/string/goals/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"
}Update a goal
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Goal identifier
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PUT "https://loading/api/v1/agents/string/goals/string" \ -H "Content-Type: application/json" \ -d '{}'{
"$schema": "/api/v1/schemas/Goal.json",
"achieved_at": "2019-08-24T14:15:22Z",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"goal_id": "string",
"priority": 0,
"related_traits": [
"string"
],
"status": "string",
"title": "string",
"type": "string",
"updated_at": "2019-08-24T14:15:22Z",
"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"
}