PUT /api/v1/member-tasks/{memberTaskId}
Replaces the definition of a task. This is also how a task is published:
set status to published and members see it.
This is a full replacement, not a partial update. Send every field you want
to keep. An omitted optional field is erased, and an omitted milestoneId
detaches the task from its milestone — it then appears under Other actions.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — a task is changed by whoever may change the program |
| Resource scope | Task of the school attached to the API key; the milestone, if given, must belong to the task's program |
| Participation | None |
| Resource state | An archived task, or a task of an archived program, answers 403 |
| 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 change |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
title | string | yes | no | 3 to 100 characters |
requirement | string | yes | no | required, recommended or optional |
status | string | yes | no | draft or published. Archiving is its own endpoint |
milestoneId | UUID | no | yes | Omitted or null: the task stands on its own |
instructions | string | no | yes | Up to 2000 characters; omitted or null erases |
context | string | no | yes | Up to 2000 characters; omitted or null erases |
dueOffsetDays |
dueOffsetDays and dueAt are mutually exclusive.
{
"title": "Ship your landing page",
"milestoneId": "7a0c9e1b-0000-4000-8000-000000000000",
"instructions": "Publish a landing page for your offer and share its URL.",
"requirement": "required",
"dueOffsetDays": 14,
"status": "published"
}curl -X PUT "$COHORTE_API_BASE_URL/api/v1/member-tasks/$TASK_ID" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"title":"Ship your landing page","milestoneId":"'"$MILESTONE_ID"'","requirement":"required","dueOffsetDays":14,"status":"published"}'200 OK — the task, as it now stands. replayed is true when the same Idempotency-Key replayed an earlier change.400 Bad Request — missing Idempotency-Key, invalid JSON, a missing required field, both deadline rules at once, status: archived, or a milestone of another program.401 Unauthorized — the key is missing, invalid, or no longer attached to a member.403 Forbidden — the bearer is not OWNER or ADMIN, the task is archived, or its program is archived.404 Not Found — the task is unknown or belongs to another school.The same fields as Create a member task.
{
"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": "Publish a landing page for your offer and share its URL.",
"context": null,
"requirement": "required",
"dueOffsetDays"
member_task.updated event — carrying the
definition before and after — are written in one transaction.| integer |
| no |
| yes |
0 to 730 days after enrollment; omitted or null erases |
dueAt | ISO 8601 string | no | yes | A fixed deadline; omitted or null erases |