PATCH /api/v1/milestones/{milestoneId}
Changes a milestone.
title is required here, unlike the other PATCH endpoints of this API: a
milestone without a title does not exist. The three other fields follow the
usual rule — omitted means untouched, null erases.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — an expected result is changed by whoever may change the program |
| Resource scope | Milestone of the school attached to the API key |
| Resource state | An archived milestone, or 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 change |
X-Correlation-Id | no | Caller correlation id, returned or generated |
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
title | string | yes | no | 3 to 100 characters |
objective | string | no | yes | Up to 2000 characters; null erases |
expectedProof | string | no | yes | Up to 2000 characters; null erases |
successCriteria | string | no | yes | Up to 2000 characters; null erases |
curl -X PATCH "$COHORTE_API_BASE_URL/api/v1/milestones/$MILESTONE_ID" \
-H "x-api-key: $COHORTE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d '{"title":"First agent in production","successCriteria":"Three consecutive answers."}'200 OK — the milestone, as it now stands.400 Bad Request — missing Idempotency-Key, invalid JSON, a missing title, or a field over its limit.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 milestone is archived.404 Not Found — the milestone is unknown or belongs to another school.{
"success": true,
"replayed": false,
"data": {
"id": "2e6a9c14-8b7d-4f3e-a5c2-0f1a2b3c4d5e",
"programId": "9f2c0a1e-4b7d-4c1a-9e3f-2a6b8c0d1e2f",
"title": "First agent in production",
"objective": "Deploy an agent that answers real users.",
"expectedProof": "A public URL and a short demo video.",
"successCriteria": "Three consecutive answers.",
"status": "active",
"createdAt": "2026-09-01T09:00:00.000Z",
"updatedAt": "2026-09-04T17:12:00.000Z"
},
"correlationId": "0f6b1d92-5c3e-4a8b-9d71-3e2f4a6b8c10"
}