POST /v1/users/milestones/ with email and a string of milestone ids → on 400 Milestone not found collect the configured ids from admin → retry with those ids.milestones is a string, not an array. The documented shape is "id, id".Authorization: Bearer <COMMUNITY_API_KEY>. Keep the key server-side.| Failure | Result | Recovery |
|---|---|---|
Missing or invalid Authorization | 401 | Add a valid community key. |
"milestones": "not-a-real-milestone" returns 400 with message: Milestone not found: not-a-real-milestone.milestones as a JSON array returns a validation error: expected string, received array.200 when the ids exist in this community. Confirm the same member with POST /v1/users/info.400 Milestone not found: <id>. That is input to fix, not a missing route.| Status | When | Recovery |
|---|---|---|
400 Milestone not found: <id> | The string does not match a milestone in this community | Use ids from the community milestone configuration. |
400 expected string, received array | milestones sent as JSON array | Send a string. |
401 | Missing or invalid Bearer token | Add a valid community key. |
400 Milestone not found without changing milestones. Repeating an unknown id will not create the milestone./v1/users/milestones/.milestones is a string. Comma-separated ids match the documented example, not a JSON array.400 message.curl --location 'https://api.returning.ai/v1/users/milestones/' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "test@test.com",
"milestones": "id, id"
}'{
"milestones": [
{
"name": "Balance boosters",
"id": 12345678,
"cleared": false,
"stages": [
{
"name": "USD $0 to $2,000",
"cleared": true
},
{
"name": "USD $2,000 to $5,000",
"cleared": false
}
}
]
}