Outcome
Create a new pending milestone for an account in the authorized workspace, using the account owner as recipient. Creation creates a new id on every call and emits no milestone-reached notification.
Before you start
- Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
- The published application permission is workspace:write. Discover a granted Success workspace and bind that exact resource. Supplied identifiers do not grant access.
- Authorize the documented mirror, notification, metering, privacy or archival effects before CLI --confirm or MCP confirm:true. A GET request can initialize a local mirror.
Discover the target
topolo whoami --json
topolo actions get app_topolo_success.milestones.create --detail --json
topolo resources topolo-success --json
topolo workspaces list topolo-success --json
- Select the exact granted workspace id as SUCCESS_WORKSPACE_ID. Fixture ids authorize no live operation.
- Discover account ids through accounts.list or the reviewed accounts.create response.
Request
POST /api/accounts/{accountId}/milestones
Save action input as payload.json. Inspect the plan for the exact path, query and body. Set SUCCESS_WORKSPACE_ID from granted resource discovery.
Inspect and test this action in the signed action console, then perform the verification below.
Input fields
| Field | Required | Type | Constraints |
|---|---|---|---|
accountId | Required | string | Account id returned by accounts.list or accounts.create in this same granted workspace.; {"minLength":1} |
name | Required | string | Customer account or milestone name; use the input constraints below. This is not an idempotency key.; {"minLength":1,"maxLength":160} |
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"accountId": {
"type": "string",
"minLength": 1,
"description": "Account id returned by accounts.list or accounts.create in this same granted workspace."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"description": "Customer account or milestone name; use the input constraints below. This is not an idempotency key."
}
},
"required": [
"accountId",
"name"
],
"additionalProperties": false
}
Effects
- After static permission and platform workspace authorization, the route inserts the local identity-only workspace mirror if absent; even GET listing is a potential write.
- Creates a successmile row with pending status and null reached_at; recipient is the account owner. Repeated creation is not deduplicated.
Interpret the response
Use response path $.milestone.id for success_milestone. An empty list does not discover a target.
Save milestone.id and account_id from the response. No public milestone listing action is currently published. Only call milestones.reach after the real customer milestone has occurred; account listing does not contain milestone records.
The success schema below was checked against captured handler responses. Delegated Auth profile fields and sanitized notification payload fields can vary; exact outer envelopes and SQL row fields are source-reviewed. Error examples retain their actual refusal shapes.
Success schema:
{
"type": "object",
"properties": {
"milestone": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Source-defined string field."
},
"organization_id": {
"type": "string",
"description": "Source-defined string field."
},
"workspace_id": {
"type": "string",
"description": "Source-defined string field."
},
"created_at": {
"type": "string",
"description": "Source-defined string field."
},
"updated_at": {
"type": "string",
"description": "Source-defined string field."
},
"account_id": {
"type": "string",
"description": "Source-defined string field."
},
"name": {
"type": "string",
"description": "Source-defined string field."
},
"recipient_user_id": {
"type": "string",
"description": "Source-defined string field."
},
"status": {
"type": "string",
"enum": [
"pending",
"reached"
]
},
"reached_at": {
"anyOf": [
{
"type": "string",
"description": "Source-defined string field."
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"organization_id",
"workspace_id",
"created_at",
"updated_at",
"account_id",
"name",
"recipient_user_id",
"status",
"reached_at"
],
"additionalProperties": false
}
},
"required": [
"milestone"
],
"additionalProperties": false
}
Worked examples
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Refused examples demonstrate boundaries and must not be executed as successful workflows.
Refused request · HTTP 404
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: missing milestone account.
Input · payload.json:
{
"accountId": "missing",
"name": "Launch"
}
CLI:
topolo actions validate app_topolo_success.milestones.create --data @payload.json --json
topolo actions plan app_topolo_success.milestones.create --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 404:
{
"error": "account_not_found"
}
HTTP 404. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Successful request
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: milestones.create.
Input · payload.json:
{
"accountId": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"name": "Production launch"
}
CLI:
topolo actions validate app_topolo_success.milestones.create --data @payload.json --json
topolo actions plan app_topolo_success.milestones.create --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.milestones.create --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_success.milestones.create",
"input": {
"accountId": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"name": "Production launch"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 201:
{
"milestone": {
"id": "successmile_eca2c39b-9d79-4f7f-8e07-2d1771830dae",
"account_id": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"organization_id": "org_success_fixture",
"workspace_id": "ws_success_fixture",
"name": "Production launch",
"recipient_user_id": "usr_success_fixture",
"status": "pending",
"reached_at": null,
"created_at": "2026-10-04T05:10:03.811Z",
"updated_at": "2026-10-04T05:10:03.811Z"
}
}
HTTP 201. Save milestone.id and account_id from the response. No public milestone listing action is currently published. Only call milestones.reach after the real customer milestone has occurred; account listing does not contain milestone records.
Verify the result
- Save milestone.id and account_id from the response. No public milestone listing action is currently published.
- Only call milestones.reach after the real customer milestone has occurred; account listing does not contain milestone records.
Errors and recovery
invalid_action_input(HTTP 400): Correct only the input paths reported by the runtime or CLI validator; retain action id and exact context.action_permission_required(HTTP 403): The verified credential lacks the action permission. Stop this action and request the appropriate authorized grant; an identifier or organization ownership does not grant it.organization_required(HTTP 403): Verify the authorized organization context; personal scope cannot operate on organization-owned Success data.workspace_required(HTTP 400): Discover an authorized app-scoped workspace and pass its resource binding. API keys without a workspace resource are refused.workspaces_unavailable(HTTP 503): Preserve the request id and report unavailable platform grants or database binding; do not invent a default workspace.account_not_found(HTTP 404): Discover the account through accounts.list in the same granted workspace.
Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.
Recovery boundary
No published delete-milestone or reset action exists. Do not mark a mistaken milestone reached to hide it.
Related actions
- Mark Success milestone reached: Transition a pending milestone to reached in the authorized workspace, stamp reached_at and enqueue its event. Repeating a reached milestone returns 404 rather than a second success.
Evidence
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Capture digests and test scenarios are retained in the source fixture records.