DELETE /api/v1/enrollments/{enrollmentId}/deadline-extensions/{extensionId}
Cancels an active extension: the deadline inherited from the program applies again, computed at the moment of the call. Nothing is deleted — the record is kept, marked cancelled with the account that cancelled it and the instant it happened, and stays in the enrollment history.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Conditional — only with a business role below |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | program_director scoped to the organization, or coach assigned to this enrollment |
| Resource scope | Enrollment of the organization attached to the API key; extension of that enrollment |
| Participation | An assigned coach cancels extensions on their own enrollments only |
| Resource state | The extension is still active — not already cancelled or replaced |
| Parameter | Type | Required | Description |
|---|---|---|---|
enrollmentId | UUID | yes | Enrollment visible from the key's organization |
extensionId | UUID | yes | Extension granted on that enrollment |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this organization |
Idempotency-Key | no | Stable key for this cancellation |
X-Correlation-Id | no | Caller correlation id, returned or generated |
curl -X DELETE "$COHORTE_API_BASE_URL/api/v1/enrollments/$ENROLLMENT_ID/deadline-extensions/$EXTENSION_ID" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: cancel-extension-2026-09-12"200 OK — the cancelled record, with active: false.400 Bad Request — enrollmentId or extensionId is not a UUID; code is invalid_request.401 Unauthorized — the key is missing, invalid, or no longer attached to a member; code is unauthorized.403 Forbidden — the bearer cannot manage deadlines on this enrollment; code is forbidden.404 Not Found — the enrollment is unknown or belongs to another organization, or the extension is unknown or belongs to another enrollment; code is not_found.409 Conflict — the extension was already cancelled or replaced; code is conflict.| Field | Type | Nullable | Description |
|---|---|---|---|
success | boolean | no | true for a successful request |
replayed | boolean | no | true when nothing was cancelled by this call |
data.id | UUID | no | Extension identifier |
data.enrollmentId | UUID | no | Enrollment the exception belongs to |
data.memberTaskId | UUID | no | Program action whose deadline moved |
data.memberTaskTitle | string | yes | Title of that action |
data.dueAt | ISO 8601 string | no | Deadline that had been granted, in UTC |
data.reason | string | no | Reason given when it was granted |
data.createdBy | UUID | no | Account that granted the extension |
data.createdByName | string | yes | Display name of that account |
data.createdAt | ISO 8601 string | no | When the extension was recorded, in UTC |
data.revokedAt | ISO 8601 string | yes | When it was cancelled, in UTC |
data.revokedBy | UUID | yes | Account that cancelled it |
data.revokedByName | string | yes | Display name of that account |
data.revokeReason | string | yes | null for an explicit cancellation |
data.active | boolean | no | false once cancelled |
correlationId | UUID | no | Correlation id for support |
{
"success": true,
"replayed": false,
"data": {
"id": "7c1d9a20-0000-4000-8000-000000000000",
"enrollmentId": "4af4cd8d-0000-4000-8000-000000000000",
"memberTaskId": "3b0e51a4-0000-4000-8000-000000000000",
"memberTaskTitle": "Record ten discovery calls",
"dueAt": "2026-09-20T18:00:00.000Z",
"reason": "Short hospital stay, resumption agreed.",
"createdBy": "6d41ab55-0000-4000-8000-000000000000",
"createdByName": "Ines Fabre",
"createdAt": "2026-09-05T10:00:00.000Z",
"revokedAt": "2026-09-12T09:30:00.000Z",
"revokedBy": "6d41ab55-0000-4000-8000-000000000000",
"revokedByName": "Ines Fabre",
"revokeReason": null,
"active": false
},
"correlationId": "5a7e0c13-0000-4000-8000-000000000000"
}409: read
the history to confirm the current state before retrying.