Topolo Docs Topolo Platform
Open workspace

Get AI draft

Read one AI draft: its inputs, generated output, guardrail findings (error blocks approval; flag needs acknowledgement), approvable, provenance (Nexus route and model, Brand kit and voice version, claims version, prompt inputs hash, acting user) and, once approved, what was created.

Outcome

Read one AI draft: its inputs, generated output, guardrail findings (error blocks approval; flag needs acknowledgement), approvable, provenance (Nexus route and model, Brand kit and voice version, claims version, prompt inputs hash, acting user) and, once approved, what was created.

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:read; required workspace access is read. 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.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.drafts.get --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

GET /api/drafts/{id}

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}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Effects

  • Reads one draft without changing state.

Interpret the response

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

Confirm $.draft.id equals the requested id.

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"
}

CLI:

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

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.drafts.get",
    "input": {
      "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "draft": {
    "id": "dft_d3dd0e0640924b809281aebc4a3fb6dc",
    "kind": "template_copy",
    "status": "proposed",
    "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": true,
    "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.565Z",
    "decidedBy": null,
    "decidedAt": null,
    "decisionNote": null,
    "applied": null
  }
}

HTTP 200. Confirm $.draft.id equals the requested id.

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_bef9c91df1574ca796efa041e46bef7c"
}

CLI:

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

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.drafts.get",
    "input": {
      "id": "dft_bef9c91df1574ca796efa041e46bef7c"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "draft": {
    "id": "dft_bef9c91df1574ca796efa041e46bef7c",
    "kind": "template_copy",
    "status": "proposed",
    "inputs": {
      "goal": "Welcome new trial users",
      "audience": "Developers who just signed up",
      "templateId": "tpl_548d7b6d44404b60bbeae6b215463f4c"
    },
    "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": true,
    "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": "99aa63c292756aaa3b4ab15c7f9d0570a95788a15e2b6180a1bb3a0fd75f37d0",
      "actingUserId": "u1",
      "generatedAt": "2026-10-04T00:32:34.626Z"
    },
    "attempt": 1,
    "createdBy": "u1",
    "createdAt": "2026-10-04T00:32:34.626Z",
    "updatedAt": "2026-10-04T00:32:34.628Z",
    "decidedBy": null,
    "decidedAt": null,
    "decisionNote": null,
    "applied": null
  }
}

HTTP 200. Confirm $.draft.id equals the requested id.

Refused request · not_found

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_missing"
}

CLI:

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

Captured local response · HTTP 404:

{
  "error": {
    "code": "not_found",
    "message": "Draft was not found in this workspace."
  }
}

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

Verify the result

  • Confirm $.draft.id equals the requested id.

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.

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

This action does not change service state.

  • 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.
  • Reject AI draft: Reject a proposed draft as the calling person, with an optional note. Nothing is applied; the draft is kept for audit.
  • Regenerate AI draft: Generate a proposed draft again from its stored inputs and the current Brand voice, optionally guided by reviewer feedback. The output, findings and provenance are replaced and attempt increases. Only proposed drafts can be regenerated; nothing is applied.

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.