Remove a label from a trainee
DELETE/api/public/trainees/{traineeId}/labels/{labelId}
Detach a single label from one trainee. The label itself is not deleted and other trainees keep it. Returns journeyOutcome, which reports whether removing this label left the trainee's active journey enrolment without a matching label.
Authentication
Requires an API key, sent as Authorization: Bearer cp_live_....
API keys carry scopes. Get the catalog of scopes and webhook events lists every scope.
Path parameters
| Name | Type | Description |
|---|---|---|
traineeIdrequired | string | |
labelIdrequired | string |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate. |
Request examples
curl --request DELETE \
--url 'https://api.coach-platform.com/api/public/trainees/<traineeId>/labels/<labelId>' \
--header 'Authorization: Bearer cp_live_...'const response = await fetch('https://api.coach-platform.com/api/public/trainees/<traineeId>/labels/<labelId>', {
method: 'DELETE',
headers: {
Authorization: 'Bearer cp_live_...',
},
});
const data = await response.json();Responses
200 OK
Successful response
{
"data": {
"message": "<string>",
"journeyOutcome": {
"status": "<string>",
"enrollmentId": "<string>",
"journeyId": "<string>",
"journeyTitle": "<string>",
"canAct": true
}
}
}Response fields (8)
| Name | Type | Description |
|---|---|---|
data | object | |
data.message | string | |
data.journeyOutcome | object | null | |
data.journeyOutcome.status | string | |
data.journeyOutcome.enrollmentId | string | null | |
data.journeyOutcome.journeyId | string | null | |
data.journeyOutcome.journeyTitle | string | null | |
data.journeyOutcome.canAct | boolean | null |
Error responses
400Bad Request401Unauthorized403Forbidden404Not Found409Conflict429Too Many Requests500Internal Server Error
These statuses share the same response body.
{
"error": {
"code": "<string>",
"message": "<string>",
"fix": "<string>",
"details": {},
"retryAfterMs": 123
}
}Error fields (6)
| Name | Type | Description |
|---|---|---|
error | object | |
error.code | string | |
error.message | string | |
error.fix | string | null | |
error.details | object | null | |
error.retryAfterMs | number | null |
More Labels endpoints
This page is also available as Markdown. Browse it in the interactive explorer or download the OpenAPI spec.