Smart Agent Teams
EndpointsGoals

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`.

POST
/api/companies/{company_id}/goals

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.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

company_id*Company Id
Formatuuid

Request Body

application/json
  1. body
description?string|null
owner_agent_id?|null
parent_id?|null
status?Status
Default"active"
Value in"planned""active""achieved""abandoned"
target_date?|null
title*Title
Length1 <= length <= 200

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 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"}