POST /api/v1/member-tasks/{memberTaskId}/archive
Retires a task. It is a change of state, never a deletion: what members already completed stays recorded, and the task accepts no further change.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — a task is retired by whoever may change the program |
| Resource scope | Task of the school attached to the API key |
| Participation | None |
| Resource state | None — archiving an archived task changes nothing and answers 200 |
| Parameter | Type | Required | Description |
|---|---|---|---|
memberTaskId | UUID | yes | Task visible from the key's school |
| Header | Required | Description |
|---|---|---|
x-api-key | yes | API key created for this school |
Idempotency-Key | yes | Stable key for this archival |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
effectiveAt | ISO 8601 string | no | no | When the archival takes effect. Defaults to now |
reason | string | no | yes | Up to 500 characters |
curl -X POST "$COHORTE_API_BASE_URL/api/v1/member-tasks/$TASK_ID/archive" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"reason":"Merged into the landing page task."}'200 OK — the task is archived. replayed is true when it already was, and nothing was written.400 Bad Request — missing Idempotency-Key, invalid JSON, an invalid date, or a reason over 500 characters.401 Unauthorized — the key is missing, invalid, or no longer attached to a member.403 Forbidden — the bearer is not OWNER or ADMIN of this school.404 Not Found — the task is unknown or belongs to another school.The same fields as Create a member task, with data.status set to archived.
{
"success": true,
"data": {
"id": "c3f1d2a4-0000-4000-8000-000000000000",
"programId": "4d19c0a2-0000-4000-8000-000000000000",
"milestoneId": "7a0c9e1b-0000-4000-8000-000000000000",
"title": "Ship your landing page",
"instructions": null,
"context": null,
"requirement": "required",
"dueOffsetDays": 14,
"dueAt": null,
"status": "archived",
"createdAt": "2026-09-24T08:00:00.000Z",
"updatedAt": "2026-09-30T08:00:00.000Z"
},
"replayed": false,
"correlationId": "b0e7f1c2-1d3a-4a52-9f77-52a4b7c3d1e0"
}member_task.archived event are written
in one transaction.