Creates a goal from type. For personal, the assignee LMS reference must identify an active user and a single personal goal is created. For assigned, assigner and assignees are required LMS references of active users; one goal is created per assignee and the response includes the shared definition id plus per-assignee goal ids. Completed personal goals cannot be created through this path; use the completions API for history.
HTTP Basic authentication using your Tenant ID and API secret.
- Username is the Tenant ID (i.e.
eu-west-2_AbcdEfghI) - Password is the API secret you would have received.
You can also authenticate using OAuth 2.0 client credentials (oauth2 security scheme) instead of Basic auth.
OAuth 2.0 client credentials authentication.
Use the following token endpoints (replace :tenantId with your Tenant ID):
Public API access tokens
- Staging:
https://public.api.learnstaging.link/oauth2/token/:tenantId - Production:
https://public.api.learn.link/oauth2/token/:tenantId - Staging MEA:
https://public.api.meastaging.learn.tech/oauth2/token/:tenantId - Production MEA:
https://public.api.mea.learn.tech/oauth2/token/:tenantId
- Staging:
Webhooks access tokens
- Staging:
https://user.api.learnstaging.link/oauth2/token/:tenantId - Production:
https://user.api.learn.link/oauth2/token/:tenantId - Staging MEA:
https://user.api.meastaging.learn.tech/oauth2/token/:tenantId - Production MEA:
https://user.api.mea.learn.tech/oauth2/token/:tenantId
- Staging:
All access tokens must be sent using the Authorization: Bearer <access_token> header.
Scopes
For API access (non-webhooks), the following scopes are available:
api/all– Full read and write access to the API.api/read– Read-only access to the API.api/write– Write access to the API.
For webhooks, the following scopes are available:
api/webhooks– Access to webhook functionality.api/all– Full read and write access to the API, including webhooks.
Tokens must include appropriate scopes for the endpoints you wish to call.
LMS reference of the user who will own the goal
Name of a skill that already exists in the organisation. A name that is not a skill is rejected with 422.
Empty or omitted for basic tasks; required and non-empty for content tasks. Each id must be a 24-character hex ObjectId of content that exists in the tenant. A missing id is rejected with 422.
LMS reference of the assigner (createdBy). Required. That user must exist and be active on the tenant.
LMS references of users who will receive the goal
Name of a skill that already exists in the organisation. A name that is not a skill is rejected with 422.
Required when willBoostLevel is true. Must be an enabled skill level value for the tenant. The 422 lists the accepted values. A tenant with no skill levels configured accepts the defaults: Beginner (1024), Intermediate (2048) and Advanced (3072). A tenant can define different ones.
Empty or omitted for basic tasks; required and non-empty for content tasks. Each id must be a 24-character hex ObjectId of content that exists in the tenant. A missing id is rejected with 422.
Created goal payload (shape depends on type)
The goal ID
The goal owner's user ID
Id of the shared goal definition
LMS ref from the request
Resolved MongoDB user id
Created goal document id for this assignee
Unauthorized
Unauthorized
Forbidden — the OAuth2 token does not carry the api/write or api/all scope
The error envelope of the V2 endpoints.
Present on field validation failures. One entry per failed rule.
One failed validation rule.
The dotted path of the field that failed, for example items.0.meta.body. Empty for a body-level rule.
Why the field failed.
Unsupported Media Type — Content-Type must be application/json
The error envelope of the V2 endpoints.
Present on field validation failures. One entry per failed rule.
One failed validation rule.
The dotted path of the field that failed, for example items.0.meta.body. Empty for a body-level rule.
Why the field failed.
Unprocessable Content
Unprocessable Content
Bad Gateway
The request could not be completed because a service it depends on failed. For write operations the content was not modified.
Internal Server Error
Internal Server Error