Topolo Docs Topolo Platform
Open workspace

Approve AI draft

Approve a proposed draft as the calling person (recorded in decidedBy). Refused when a finding is an error, when flags exist without acknowledgeFlags true, or (with requireSecondApprover) when the caller requested it. Copy for a template becomes a NEW non-current version (make it current by saving it with app_topolo_nurture.templates.update); other copy becomes a new template; subject_lines applies candidate subjectIndex; a journey becomes a DRAFT journey with new templates. Nothing is published or sent.

Outcome

Approve a proposed draft as the calling person (recorded in decidedBy). Refused when a finding is an error, when flags exist without acknowledgeFlags true, or (with requireSecondApprover) when the caller requested it. Copy for a template becomes a NEW non-current version (make it current by saving it with app_topolo_nurture.templates.update); other copy becomes a new template; subject_lines applies candidate subjectIndex; a journey becomes a DRAFT journey with new templates. Nothing is published or sent.

Before you start

  • Verify identity and pin the intended organization and environment before discovering the action.
  • Discover a granted Nurture workspace. The application permission is workspace:write; required workspace access is read_write. A permission alone does not supply a workspace grant.
  • Organization and workspace come from verified context. Select resourceType/resourceId separately from action input; body fields cannot grant a different organization or workspace. The first authorized product action can initialize an identity-only workspace mirror.
  • Obtain authorization for the documented effect or personal-data export before supplying CLI --confirm or MCP confirm:true.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.drafts.approve --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.drafts.list --detail --json
  • id: drafts record id in the selected workspace.

Request

POST /api/drafts/{id}/approve

Save action input as payload.json. The reviewed plan separates path identifiers, query fields and HTTP body. Set NURTURE_WORKSPACE_ID from granted resource discovery; it is separate from action input.

Inspect and test this action in the signed action console. A test response still requires the verification below.

Input fields

FieldRequiredTypeConstraints
idRequiredstringdrafts record id in the selected workspace. {"minLength":1,"maxLength":64}
acknowledgeFlagsOptionalboolean{}
subjectIndexOptionalinteger{"minimum":0,"maximum":9}
nameOptionalstring{"minLength":1,"maxLength":120}
noteOptionalstring{"minLength":1,"maxLength":1000}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "acknowledgeFlags": {
      "type": "boolean"
    },
    "subjectIndex": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Effects

  • Marks the draft approved and creates a non-current template version, a new template, or a draft journey with new templates ($.draft.applied).

Interpret the response

The returned identifier path is $.draft.id for draft. Empty lists do not discover a target.

Call app_topolo_nurture.drafts.get and read $.draft.applied; then app_topolo_nurture.templates.get or app_topolo_nurture.journeys.get (status draft).

Exact success schema:

{
  "type": "object",
  "required": [
    "draft"
  ],
  "properties": {
    "draft": {
      "type": "object",
      "required": [
        "id",
        "kind",
        "status",
        "findings",
        "approvable",
        "provenance"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "template_copy",
            "subject_lines",
            "journey"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "approved",
            "rejected"
          ]
        },
        "inputs": {
          "type": "object"
        },
        "output": {},
        "findings": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "code",
              "severity",
              "path",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "error",
                  "flag"
                ]
              },
              "path": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "approvable": {
          "type": "boolean"
        },
        "provenance": {
          "type": "object",
          "required": [
            "route",
            "provider",
            "model",
            "brandKitId",
            "brandVoiceVersion",
            "claimsVersion",
            "promptInputsHash",
            "actingUserId",
            "generatedAt"
          ],
          "properties": {
            "route": {
              "type": "string"
            },
            "provider": {
              "type": "string"
            },
            "model": {
              "type": "string"
            },
            "requestId": {
              "type": [
                "string",
                "null"
              ]
            },
            "brandKitId": {
              "type": "string"
            },
            "brandVoiceVersion": {
              "type": "string"
            },
            "claimsVersion": {
              "type": "string"
            },
            "promptInputsHash": {
              "type": "string"
            },
            "actingUserId": {
              "type": "string"
            },
            "generatedAt": {
              "type": "string"
            }
          }
        },
        "attempt": {
          "type": "integer"
        },
        "createdBy": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "decidedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "decidedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "decisionNote": {
          "type": [
            "string",
            "null"
          ]
        },
        "applied": {
          "type": [
            "object",
            "null"
          ]
        }
      }
    }
  }
}

Worked examples

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Replace synthetic identifiers using credential-scoped discovery. A local success is not evidence of a deployed effect, configured provider or delivered message.

Successful request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc",
  "note": "Good"
}

CLI:

topolo actions validate app_topolo_nurture.drafts.approve --data @payload.json --json
topolo actions plan app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.drafts.approve",
    "input": {
      "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc",
      "note": "Good"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "draft": {
    "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc",
    "kind": "template_copy",
    "status": "approved",
    "inputs": {
      "goal": "Welcome new trial users",
      "audience": "Developers who just signed up"
    },
    "output": {
      "content": {
        "subject": "Welcome aboard",
        "preheader": "Start here",
        "blocks": [
          {
            "id": "h",
            "kind": "heading",
            "level": 1,
            "text": "Hello"
          },
          {
            "id": "body",
            "kind": "text",
            "text": "Your workspace is ready, {{contact.firstName|there}}."
          },
          {
            "id": "footer",
            "kind": "footer"
          }
        ]
      },
      "claimIds": []
    },
    "findings": [],
    "approvable": false,
    "provenance": {
      "route": "app_topolo_nexus.ai.completions.create",
      "provider": "anthropic",
      "model": "test-model",
      "requestId": "req_1",
      "brandKitId": "bk_1",
      "brandVoiceVersion": "bkv_3",
      "claimsVersion": "bkv_3:e249a86d78e6c46b",
      "promptInputsHash": "3b638660aea82d9590afd02882b169abb6e07e81d60cb4e2749e11449896c843",
      "actingUserId": "u1",
      "generatedAt": "2026-10-04T00:32:34.565Z"
    },
    "attempt": 1,
    "createdBy": "u1",
    "createdAt": "2026-10-04T00:32:34.565Z",
    "updatedAt": "2026-10-04T00:32:34.573Z",
    "decidedBy": "u1",
    "decidedAt": "2026-10-04T00:32:34.573Z",
    "decisionNote": "Good",
    "applied": {
      "templateId": "tpl_bf73c1a4be854bcaa0f9e626514a2e18",
      "templateVersion": 1
    }
  }
}

HTTP 200. Call app_topolo_nurture.drafts.get and read $.draft.applied; then app_topolo_nurture.templates.get or app_topolo_nurture.journeys.get (status draft).

Another supported request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "dft_0a8cfa6b09e84b8097eaa20146c7de2e",
  "name": "Welcome v2"
}

CLI:

topolo actions validate app_topolo_nurture.drafts.approve --data @payload.json --json
topolo actions plan app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.drafts.approve",
    "input": {
      "id": "dft_0a8cfa6b09e84b8097eaa20146c7de2e",
      "name": "Welcome v2"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "draft": {
    "id": "dft_0a8cfa6b09e84b8097eaa20146c7de2e",
    "kind": "journey",
    "status": "approved",
    "inputs": {
      "goal": "Welcome new trial users",
      "audience": "Developers who just signed up",
      "blueprintId": "welcome_series",
      "topicKey": "news"
    },
    "output": {
      "name": "Welcome",
      "description": "Three welcome emails",
      "messages": {
        "email_1": {
          "subject": "One",
          "blocks": [
            {
              "id": "b",
              "kind": "text",
              "text": "Glad you are here."
            },
            {
              "id": "footer",
              "kind": "footer"
            }
          ]
        },
        "email_2": {
          "subject": "Two",
          "blocks": [
            {
              "id": "b",
              "kind": "text",
              "text": "Glad you are here."
            },
            {
              "id": "footer",
              "kind": "footer"
            }
          ]
        },
        "email_3": {
          "subject": "Three",
          "blocks": [
            {
              "id": "b",
              "kind": "text",
              "text": "Glad you are here."
            },
            {
              "id": "footer",
              "kind": "footer"
            }
          ]
        }
      },
      "claimIds": []
    },
    "findings": [],
    "approvable": false,
    "provenance": {
      "route": "app_topolo_nexus.ai.completions.create",
      "provider": "anthropic",
      "model": "test-model",
      "requestId": "req_1",
      "brandKitId": "bk_1",
      "brandVoiceVersion": "bkv_3",
      "claimsVersion": "bkv_3:e249a86d78e6c46b",
      "promptInputsHash": "78cb0b67ff509f3072dea30b01cd0b8fee020f79d31d8754086d897b69a1c617",
      "actingUserId": "u1",
      "generatedAt": "2026-10-04T00:32:34.763Z"
    },
    "attempt": 1,
    "createdBy": "u1",
    "createdAt": "2026-10-04T00:32:34.763Z",
    "updatedAt": "2026-10-04T00:32:34.767Z",
    "decidedBy": "u1",
    "decidedAt": "2026-10-04T00:32:34.767Z",
    "decisionNote": null,
    "applied": {
      "journeyId": "jny_35faeb2f3d214c68a7aed31195051234",
      "templateIds": {
        "email_1": "tpl_8583cb2c15bd47f0b2d05e265518548d",
        "email_2": "tpl_f9a810eb9ec34043afdd729f8fb5b15a",
        "email_3": "tpl_e8f310177a634f789b98f4e7c6520922"
      }
    }
  }
}

HTTP 200. Call app_topolo_nurture.drafts.get and read $.draft.applied; then app_topolo_nurture.templates.get or app_topolo_nurture.journeys.get (status draft).

Refused request · draft_decided

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc"
}

CLI:

topolo actions validate app_topolo_nurture.drafts.approve --data @payload.json --json
topolo actions plan app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 409:

{
  "error": {
    "code": "draft_decided",
    "message": "This draft was already approved."
  }
}

HTTP 409. Preserve the refusal details and do not claim success.

Refused request · subject_index_out_of_range

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "dft_b58f308959e64dff80504d598e20e1d6",
  "subjectIndex": 5
}

CLI:

topolo actions validate app_topolo_nurture.drafts.approve --data @payload.json --json
topolo actions plan app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 422:

{
  "error": {
    "code": "subject_index_out_of_range",
    "message": "Pick subjectIndex between 0 and 1."
  }
}

HTTP 422. Preserve the refusal details and do not claim success.

Refused request · second_approver_required

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "dft_5f5aafc16ae448bfb04309a997eaa943"
}

CLI:

topolo actions validate app_topolo_nurture.drafts.approve --data @payload.json --json
topolo actions plan app_topolo_nurture.drafts.approve --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 403:

{
  "error": {
    "code": "second_approver_required",
    "message": "This workspace requires someone other than the requester to approve AI drafts."
  }
}

HTTP 403. Preserve the refusal details and do not claim success.

Verify the result

  • Call app_topolo_nurture.drafts.get and read $.draft.applied; then app_topolo_nurture.templates.get or app_topolo_nurture.journeys.get (status draft).

Errors and recovery

  • organization_required (HTTP 403): Select an organization available to the verified caller before choosing a Nurture workspace.
  • permission_denied (HTTP 403): Grant the credential the required Nurture workspace permission.
  • workspace_required (HTTP 409): Create a Nurture workspace, or pass the workspace resource context.
  • invalid_input (HTTP 422): Correct the fields named in error.details using inputSchema, then retry.
  • not_found (HTTP 404): List drafts to find a valid id in this workspace.
  • draft_decided (HTTP 409): The draft was already approved or rejected; create a new one with app_topolo_nurture.drafts.create.
  • second_approver_required (HTTP 403): Ask another workspace member to approve.
  • draft_blocked (HTTP 409): Regenerate or reject; a guardrail error cannot be approved.
  • flags_unacknowledged (HTTP 409): A person must review the flagged claims, then approve with acknowledgeFlags true.
  • template_unavailable (HTTP 409): The template was archived; reject the draft.
  • subject_index_out_of_range (HTTP 422): Pick a subjectIndex within candidates.

Auth or gateway failures may precede this handler. Preserve the exact response shape, error string/code, request id and credential context; no synthetic fixture establishes live credential access.

Recovery boundary

Archive the created template or draft journey named in applied; a non-current version is never used until saved as current.

  • Get email template: Read one email template with its subject, preheader and blocks. Without version it returns the current version; with version it returns that immutable historical version.
  • Get journey: Read one journey: its editable draft definition, status, live currentVersion and whether the draft has unpublished changes.
  • Archive email template: Archive an email template so it can no longer be edited or chosen for new email. Its versions are kept for history.

Evidence

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Test scenario and capture digests are retained with each fixture.