Create Goal
Create a goal, optionally nested under a parent goal and owned by an agent. `parent_id` and `owner_agent_id` must belong to this company (404 `NOT_FOUND` otherwise). `status` defaults to `active`. Publishes `goal.created`.
Create a goal, optionally nested under a parent goal and owned by an agent.
parent_id and owner_agent_id must belong to this company (404 NOT_FOUND
otherwise). status defaults to active. Publishes goal.created.
HTTPBearerAuthorizationBearer <token>company_id*Company Iduuidapplication/json- body
description?string|nullowner_agent_id?|nullparent_id?|nullstatus?Status"active""planned""active""achieved""abandoned"target_date?|nulltitle*Title1 <= length <= 200Successful Response
application/json- response
created_at*|nulldescription*string|nullid*Iduuidowner_agent_id*|nullparent_id*|nullstatus*Statustarget_date*|nulltasks_done?Tasks Done0tasks_total?Tasks Total0title*Titlecurl -X POST "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/goals" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "owner_agent_id": "5219977a-7944-4486-9ee6-547d2b1c19ff", "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef", "status": "string", "target_date": "2019-08-24T14:15:22Z", "tasks_done": 0, "tasks_total": 0, "title": "string"}List Goals GET
List the company's goals, oldest first, with task progress. `tasks_total` counts the goal's linked tasks that are not `cancelled`; `tasks_done` counts those that are `done`. Goals are returned flat; nest them with `parent_id`.
Update Goal PATCH
Update a goal; only fields present in the body are changed. A new `parent_id` must be a goal in this company and must not nest the goal under itself or one of its descendants (400 `GOAL_CYCLE`). Publishes `goal.updated` when something changed.