Outcome
Create a pending task for an authorized account with a required ISO due time. Immediate creation does not complete the task or send its due reminder; scheduled processing handles due events later.
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.playbook_tasks.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}/playbook-tasks
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} |
title | Required | string | Task title; repeated requests create separate tasks rather than deduplicate by title.; {"minLength":1,"maxLength":240} |
dueAt | Required | string | Required ISO due instant; scheduling the due reminder does not complete the task.; {} |
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."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 240,
"description": "Task title; repeated requests create separate tasks rather than deduplicate by title."
},
"dueAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "Required ISO due instant; scheduling the due reminder does not complete the task."
}
},
"required": [
"accountId",
"title",
"dueAt"
],
"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 new successtask id and pending row with recipient equal to the account owner. Repeated calls create distinct tasks.
- Scheduled processing can claim due tasks in batches of 250 and queue an event once; that scheduled completion is not established by the create response.
Interpret the response
Use response path $.task.id for success_playbook_task. An empty list does not discover a target.
Save task.id and verify its account_id, title and due_at; list tasks in the same granted workspace for persisted schedule fields. Do not claim a task is complete or a reminder was delivered from HTTP 201.
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": {
"task": {
"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."
},
"title": {
"type": "string",
"description": "Source-defined string field."
},
"recipient_user_id": {
"type": "string",
"description": "Source-defined string field."
},
"due_at": {
"type": "string",
"description": "Source-defined string field."
},
"status": {
"type": "string",
"enum": [
"pending",
"completed"
]
}
},
"required": [
"id",
"organization_id",
"workspace_id",
"created_at",
"updated_at",
"account_id",
"title",
"recipient_user_id",
"due_at",
"status"
],
"additionalProperties": false
}
},
"required": [
"task"
],
"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.
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: playbook_tasks.create.
Input · payload.json:
{
"accountId": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"title": "Review adoption",
"dueAt": "2027-03-01T12:00:00Z"
}
CLI:
topolo actions validate app_topolo_success.playbook_tasks.create --data @payload.json --json
topolo actions plan app_topolo_success.playbook_tasks.create --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.playbook_tasks.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.playbook_tasks.create",
"input": {
"accountId": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"title": "Review adoption",
"dueAt": "2027-03-01T12:00:00Z"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 201:
{
"task": {
"id": "successtask_ec822197-6dc7-4890-82af-353d4e2b238d",
"account_id": "successacct_7054c378-7a67-4c4f-aad1-fa6464e35cd5",
"organization_id": "org_success_fixture",
"workspace_id": "ws_success_fixture",
"title": "Review adoption",
"recipient_user_id": "usr_success_fixture",
"due_at": "2027-03-01T12:00:00Z",
"status": "pending",
"created_at": "2026-10-04T05:10:03.891Z",
"updated_at": "2026-10-04T05:10:03.891Z"
}
}
HTTP 201. Save task.id and verify its account_id, title and due_at; list tasks in the same granted workspace for persisted schedule fields. Do not claim a task is complete or a reminder was delivered from HTTP 201.
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 task account.
Input · payload.json:
{
"accountId": "missing",
"title": "Review",
"dueAt": "2027-03-01T12:00:00Z"
}
CLI:
topolo actions validate app_topolo_success.playbook_tasks.create --data @payload.json --json
topolo actions plan app_topolo_success.playbook_tasks.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.
Verify the result
- Save task.id and verify its account_id, title and due_at; list tasks in the same granted workspace for persisted schedule fields.
- Do not claim a task is complete or a reminder was delivered from HTTP 201.
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): Resolve the account through accounts.list in the same granted resource.
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 task-complete, task-edit or task-delete action exists. Check existing tasks before a retry; organization erasure is not a narrow task recovery.
Related actions
- List Success playbook tasks: List all tasks for the authorized workspace, ordered by due time and then creation time. Persisted rows include nullable notification and completion timestamps; the request can create the identity mirror.
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.