Update Goal
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.
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.
HTTPBearerAuthorizationBearer <token>goal_id*Goal Iduuidcompany_id*Company Iduuidapplication/json- body
description?string|nullowner_agent_id?|nullparent_id?|nullstatus?|nulltarget_date?|nulltitle?|nullSuccessful 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 PATCH "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/goals/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "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"}Create Goal POST
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`.
Delete Goal DELETE
Delete a goal. Child goals move up to the deleted goal's parent, and tasks linked to it are unlinked (`goal_id` becomes null); the tasks themselves are kept. Publishes `goal.deleted`.