Smart Agent Teams
EndpointsGoals

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.

PATCH
/api/companies/{company_id}/goals/{goal_id}

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.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

goal_id*Goal Id
Formatuuid
company_id*Company Id
Formatuuid

Request Body

application/json
  1. body
description?string|null
owner_agent_id?|null
parent_id?|null
status?|null
target_date?|null
title?|null

Response Body

Successful Response

application/json
  1. response
created_at*|null
description*string|null
id*Id
Formatuuid
owner_agent_id*|null
parent_id*|null
status*Status
target_date*|null
tasks_done?Tasks Done
Default0
tasks_total?Tasks Total
Default0
title*Title
curl -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"}