goals to create, manage, and attach goal records to agents. Goals represent targets or outcomes that an agent should achieve, and can include lead-info field definitions.
Supported actions: list, get, create, update, delete, attach, detach, generate.
List goals
Retrieves all goals for the authenticated user with optional filtering.Must be
"goals".Must be
"list".Response
Get a goal
Retrieves a specific goal by ID.Must be
"goals".Must be
"get".The goal UUID.
Response
Create a goal
Creates a new goal associated with an agent.Must be
"goals".Must be
"create".Response (status 201)
Update a goal
Updates an existing goal. Supports partial updates.Must be
"goals".Must be
"update".The goal UUID.
Any combination of
name, description, status, priority, agent_id.Delete a goal
Permanently deletes a goal.Must be
"goals".Must be
"delete".The goal UUID.
Response
Attach goal to agent
Links a goal (lead-info preset) to an agent. Any existing attachment for that agent is replaced.Must be
"goals".Must be
"attach".Response
Verifies ownership of both the goal and the agent before attaching.
Detach goal from agent
Removes a goal attachment from an agent.Must be
"goals".Must be
"detach".Response
Generate goal
Uses AI to generate a goal configuration from a natural-language description. Returns suggested fields that can be reviewed before saving.Must be
"goals".Must be
"generate".Response
Generation uses AI (temperature 0.5). Results are suggestions — review before saving.
Goal object
Present only in admin mode.
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid parameters |
| 401 | UNAUTHORIZED | Missing or invalid authentication |
| 403 | FORBIDDEN | Access denied |
| 404 | NOT_FOUND | Goal not found |
| 500 | INTERNAL_ERROR | Server error |

