POST /api/v1/milestones/{milestoneId}/member-tasks/reorder
Sets the order in which members see the tasks of a milestone. The complete ordered list, never a move: the ids you send must be exactly the tasks of that milestone.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — tasks are ordered by whoever may change the program |
| Resource scope | Milestone of the school attached to the API key |
| Participation | None |
| Resource state | A milestone of an archived program answers 403 |
| Parameter | Type | Required | Description |
|---|---|---|---|
milestoneId | UUID | yes | Milestone 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 ordering |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
orderedMemberTaskIds | array of UUID | yes | no | At least one id, exactly the tasks of the milestone, drafts and archived tasks included |
curl -X POST "$COHORTE_API_BASE_URL/api/v1/milestones/$MILESTONE_ID/member-tasks/reorder" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"orderedMemberTaskIds":["'"$FIRST"'","'"$SECOND"'"]}'200 OK — the tasks, in their new order.400 Bad Request — missing Idempotency-Key, invalid JSON, an empty list, or a set that is not exactly the tasks of the milestone.401 Unauthorized — the key is missing, invalid, or no longer attached to a member.403 Forbidden — the bearer is not OWNER or ADMIN, or the program is archived.404 Not Found — the milestone is unknown, belongs to another school, or has no task.The same fields as List the tasks of a milestone.
{
"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": "published",
"createdAt": "2026-09-24T08:00:00.000Z",
"updatedAt": "2026-09-24T09:00:00.000Z"
}
],
"correlationId": "b0e7f1c2-1d3a-4a52-9f77-52a4b7c3d1e0"
}member_task.reordered event are
written in one transaction. No notification is sent.With Idempotency-Key, retries of the identical target and payload do not write another mutation, audit or event. A different intention under that key returns 409. Results describe the currently authorized resource state.