Endpoint#
| Property | Value |
|---|
| Type | mutation |
| Method | POST |
| Path | /api/external/v1/create_goal |
| Handler | OperatelyWeb.Api.Mutations.CreateGoal |
Authentication#
- Requires a valid API token.
- Requires a write-enabled token.
- Read-only tokens return
403.
| Field | Type | Required | Nullable | Default |
|---|
space_id | id primitive (encoded as string) | Yes | No | - |
name | string | Yes | No | - |
champion_id | id primitive (encoded as string) | No | Yes | - |
reviewer_id | id primitive (encoded as string) | No | Yes | - |
timeframe | timeframe object | No | Yes | - |
targets | array of create_target_input object | No | Yes | - |
description | string | No | Yes | - |
parent_goal_id | id primitive (encoded as string) | No | Yes | - |
anonymous_access_level | integer | No | Yes | - |
company_access_level | integer | No | Yes | - |
space_access_level | integer | No | Yes | - |
Outputs#
| Field | Type | Required | Nullable |
|---|
goal | goal object | No | Yes |
cURL Example#
Copiedcurl --request POST \
--url "https://app.operately.com/api/external/v1/create_goal" \
--header "Authorization: Bearer ${OPERATELY_API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{"anonymous_access_level":123, "champion_id":"value", "company_access_level":123, "description":"value", "name":"value", "parent_goal_id":"value", "reviewer_id":"value", "space_access_level":123, "space_id":"value", "targets":[{"from":12.34, "index":123, "name":"value", "to":12.34, "unit":"value"}], "timeframe":{"contextual_end_date":{"date":"2026-01-01", "date_type":"day", "value":"value"}, "contextual_start_date":{"date":"2026-01-01", "date_type":"day", "value":"value"}}}'
Response Example#
{
"goal": {
"access_levels": "<access_levels>",
"archived_at": "2026-01-01",
"champion": "<person>",
"checklist": [
"<goal_check>"
],
"closed_at": "2026-01-01",
"closed_by": "<person>",
"description": "value",
"id": "value",
"inserted_at": "2026-01-01",
"is_archived": true,
"is_closed": true,
"is_outdated": true,
"last_check_in": "<goal_progress_update>",
"last_check_in_id": "value",
"my_role": "value",
"name": "value",
"next_update_scheduled_at": "2026-01-01",
"notifications": [
"<notification>"
],
"parent_goal": "<goal>",
"parent_goal_id": "value",
"permissions": "<goal_permissions>",
"potential_subscribers": [
"<subscriber>"
],
"privacy": "public",
"progress_percentage": 12.34,
"projects": [
"<project>"
],
"retrospective": "<goal_retrospective>",
"reviewer": "<person>",
"space": "<space>",
"status": "on_track",
"success": true,
"targets": [
"<target>"
],
"timeframe": "<timeframe>",
"updated_at": "2026-01-01"
}
}