Topolo Docs Topolo Platform
Open workspace

Test send broadcast

Render the broadcast's template (pinned version, else current) for up to 5 named addresses, merged with sampleContactId when given, and record a test send labelled "[Test]" in the subject. It bypasses the audience and eligibility and is allowed in any status but archived. With a verified sender (sending_settings) each address gets one email through Nexus email.send as the caller (transactional class, idempotent per address); deliveries[] reports sent with the Nexus message id, or not_sent with a reason. The rendered html and text are returned for review.

Outcome

Render the broadcast's template (pinned version, else current) for up to 5 named addresses, merged with sampleContactId when given, and record a test send labelled "[Test]" in the subject. It bypasses the audience and eligibility and is allowed in any status but archived. With a verified sender (sending_settings) each address gets one email through Nexus email.send as the caller (transactional class, idempotent per address); deliveries[] reports sent with the Nexus message id, or not_sent with a reason. The rendered html and text are returned for review.

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.broadcasts.test_send --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.broadcasts.list --detail --json
topolo actions get app_topolo_nurture.contacts.list --detail --json
  • id: broadcasts record id in the selected workspace.
  • sampleContactId: Nurture contact id whose values supply test-send rendering; this does not authorize sending to that contact.

Request

POST /api/broadcasts/{id}/test-sends

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
idRequiredstringbroadcasts record id in the selected workspace. {"minLength":1,"maxLength":64}
addressesRequiredarray{"minItems":1,"maxItems":5}
sampleContactIdOptionalstringNurture contact id whose values supply test-send rendering; this does not authorize sending to that contact. {"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
    },
    "addresses": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 254,
        "format": "email",
        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
      }
    },
    "sampleContactId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "id",
    "addresses"
  ],
  "additionalProperties": false
}

Effects

  • Records one labelled test send and emails it to each address through Nexus when a verified sender is configured; no contact, reservation or audience is touched. Sent email cannot be recalled.

Interpret the response

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

Call app_topolo_nurture.broadcasts.get and confirm the test send in testSends[].

Exact success schema:

{
  "type": "object",
  "required": [
    "testSend",
    "deliveries",
    "preview"
  ],
  "properties": {
    "testSend": {
      "type": "object",
      "required": [
        "id",
        "label",
        "subject",
        "addresses",
        "templateId",
        "templateVersion",
        "delivery"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string",
          "enum": [
            "test"
          ]
        },
        "subject": {
          "type": "string"
        },
        "addresses": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "templateId": {
          "type": "string"
        },
        "templateVersion": {
          "type": "integer"
        },
        "delivery": {
          "type": "string",
          "enum": [
            "recorded"
          ]
        },
        "requestedBy": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        }
      }
    },
    "deliveries": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "address",
          "status"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "not_sent"
            ]
          },
          "nexusMessageId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      }
    },
    "preview": {
      "type": "object",
      "required": [
        "subject",
        "html",
        "text"
      ],
      "properties": {
        "subject": {
          "type": "string"
        },
        "preheader": {
          "type": "string"
        },
        "html": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      }
    }
  }
}

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": "bc_d62ef5862dd24edda45dc4b0be926b4c",
  "addresses": [
    "Rev@Example.com",
    "rev@example.com"
  ],
  "sampleContactId": "c_missing"
}

CLI:

topolo actions validate app_topolo_nurture.broadcasts.test_send --data @payload.json --json
topolo actions plan app_topolo_nurture.broadcasts.test_send --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.broadcasts.test_send --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.broadcasts.test_send",
    "input": {
      "id": "bc_d62ef5862dd24edda45dc4b0be926b4c",
      "addresses": [
        "Rev@Example.com",
        "rev@example.com"
      ],
      "sampleContactId": "c_missing"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "testSend": {
    "id": "bts_8148869169984dd0ad994523a552f575",
    "label": "test",
    "delivery": "recorded",
    "subject": "[Test] Hello there",
    "addresses": [
      "rev@example.com"
    ],
    "templateId": "tpl_0e4d6107128e4eaca6dd242685973d8f",
    "templateVersion": 1,
    "requestedBy": "u1",
    "createdAt": "2026-10-01T09:00:00.000Z"
  },
  "deliveries": [
    {
      "address": "rev@example.com",
      "status": "not_sent",
      "reason": "sending_not_configured"
    }
  ],
  "preview": {
    "subject": "[Test] Hello there",
    "preheader": "",
    "html": "<!DOCTYPE html>\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"color-scheme\" content=\"light dark\">\n<meta name=\"supported-color-schemes\" content=\"light dark\">\n<title>Hello there</title>\n<style>\n:root{color-scheme:light dark;supported-color-schemes:light dark;}\nbody{margin:0;padding:0;width:100%;-webkit-text-size-adjust:100%;}\ntable{border-collapse:collapse;}img{-ms-interpolation-mode:bicubic;}\n@media only screen and (max-width:620px){.nt-container{width:100%!important;}.nt-pad{padding-left:20px!important;padding-right:20px!important;}.nt-col{display:block!important;width:100%!important;padding:0!important;}}\n@media (prefers-color-scheme:dark){.nt-canvas{background-color:#080c16!important;}.nt-card{background-color:#0d1321!important;border-color:#2b3545!important;}.nt-text{color:#f8fafc!important;}.nt-muted{color:#94a3b8!important;}.nt-divider{border-top-color:#2b3545!important;}.nt-link.nt-accent-neutral{color:#f8fafc!important;}.nt-button.nt-accent-neutral{background-color:#f8fafc!important;}.nt-button-label.nt-accent-neutral{color:#080c16!important;}}\n[data-ogsc] .nt-canvas{background-color:#080c16!important;}[data-ogsc] .nt-card{background-color:#0d1321!important;border-color:#2b3545!important;}[data-ogsc] .nt-text{color:#f8fafc!important;}[data-ogsc] .nt-muted{color:#94a3b8!important;}[data-ogsc] .nt-divider{border-top-color:#2b3545!important;}[data-ogsc] .nt-link.nt-accent-neutral{color:#f8fafc!important;}[data-ogsc] .nt-button.nt-accent-neutral{background-color:#f8fafc!important;}[data-ogsc] .nt-button-label.nt-accent-neutral{color:#080c16!important;}\n</style>\n</head>\n<body class=\"nt-canvas\" style=\"margin:0;padding:0;background-color:#f8fafc;\">\n<div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;\">&#8203;</div>\n<table role=\"presentation\" class=\"nt-canvas\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#f8fafc;\">\n<tr><td align=\"center\" style=\"padding:24px 12px;\">\n<table role=\"presentation\" class=\"nt-container nt-card\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:600px;max-width:600px;background-color:#ffffff;border:1px solid #e2e8f0;border-radius:8px;\">\n<tr><td style=\"height:24px;font-size:0;line-height:0;\">&nbsp;</td></tr>\n<tr><td class=\"nt-pad\" style=\"padding:0 32px 16px;\"><h1 class=\"nt-text\" style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;font-size:28px;line-height:1.25;font-weight:700;color:#020817;text-align:left;\">Hello there</h1></td></tr><tr><td class=\"nt-pad\" style=\"padding:24px 32px 32px;\"><div class=\"nt-footer\"><p class=\"nt-muted\" style=\"margin:0 0 8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;font-size:12px;line-height:1.5;color:#475569;\"><a href=\"#unsubscribe\" class=\"nt-muted\" style=\"color:#475569;text-decoration:underline;\">Unsubscribe</a> &middot; <a href=\"#preferences\" class=\"nt-muted\" style=\"color:#475569;text-decoration:underline;\">Manage preferences</a></p></div></td></tr>\n</table>\n</td></tr>\n</table>\n</body>\n</html>",
    "text": "HELLO THERE\n\nUnsubscribe: #unsubscribe\nManage preferences: #preferences\n"
  }
}

HTTP 201. Call app_topolo_nurture.broadcasts.get and confirm the test send in testSends[].

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": "bc_d62ef5862dd24edda45dc4b0be926b4c",
  "addresses": [
    "Rev@Example.com",
    "rev@example.com"
  ],
  "sampleContactId": "nct_e5d4027b5bd3417b986f241244d30389"
}

CLI:

topolo actions validate app_topolo_nurture.broadcasts.test_send --data @payload.json --json
topolo actions plan app_topolo_nurture.broadcasts.test_send --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.broadcasts.test_send --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.broadcasts.test_send",
    "input": {
      "id": "bc_d62ef5862dd24edda45dc4b0be926b4c",
      "addresses": [
        "Rev@Example.com",
        "rev@example.com"
      ],
      "sampleContactId": "nct_e5d4027b5bd3417b986f241244d30389"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "testSend": {
    "id": "bts_76cde4db03f34c50be9016a5a6de6d2f",
    "label": "test",
    "delivery": "recorded",
    "subject": "[Test] Hello Bo",
    "addresses": [
      "rev@example.com"
    ],
    "templateId": "tpl_0e4d6107128e4eaca6dd242685973d8f",
    "templateVersion": 1,
    "requestedBy": "u1",
    "createdAt": "2026-10-01T09:00:00.000Z"
  },
  "deliveries": [
    {
      "address": "rev@example.com",
      "status": "not_sent",
      "reason": "sending_not_configured"
    }
  ],
  "preview": {
    "subject": "[Test] Hello Bo",
    "preheader": "",
    "html": "<!DOCTYPE html>\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<meta name=\"x-apple-disable-message-reformatting\">\n<meta name=\"color-scheme\" content=\"light dark\">\n<meta name=\"supported-color-schemes\" content=\"light dark\">\n<title>Hello Bo</title>\n<style>\n:root{color-scheme:light dark;supported-color-schemes:light dark;}\nbody{margin:0;padding:0;width:100%;-webkit-text-size-adjust:100%;}\ntable{border-collapse:collapse;}img{-ms-interpolation-mode:bicubic;}\n@media only screen and (max-width:620px){.nt-container{width:100%!important;}.nt-pad{padding-left:20px!important;padding-right:20px!important;}.nt-col{display:block!important;width:100%!important;padding:0!important;}}\n@media (prefers-color-scheme:dark){.nt-canvas{background-color:#080c16!important;}.nt-card{background-color:#0d1321!important;border-color:#2b3545!important;}.nt-text{color:#f8fafc!important;}.nt-muted{color:#94a3b8!important;}.nt-divider{border-top-color:#2b3545!important;}.nt-link.nt-accent-neutral{color:#f8fafc!important;}.nt-button.nt-accent-neutral{background-color:#f8fafc!important;}.nt-button-label.nt-accent-neutral{color:#080c16!important;}}\n[data-ogsc] .nt-canvas{background-color:#080c16!important;}[data-ogsc] .nt-card{background-color:#0d1321!important;border-color:#2b3545!important;}[data-ogsc] .nt-text{color:#f8fafc!important;}[data-ogsc] .nt-muted{color:#94a3b8!important;}[data-ogsc] .nt-divider{border-top-color:#2b3545!important;}[data-ogsc] .nt-link.nt-accent-neutral{color:#f8fafc!important;}[data-ogsc] .nt-button.nt-accent-neutral{background-color:#f8fafc!important;}[data-ogsc] .nt-button-label.nt-accent-neutral{color:#080c16!important;}\n</style>\n</head>\n<body class=\"nt-canvas\" style=\"margin:0;padding:0;background-color:#f8fafc;\">\n<div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;\">&#8203;</div>\n<table role=\"presentation\" class=\"nt-canvas\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:#f8fafc;\">\n<tr><td align=\"center\" style=\"padding:24px 12px;\">\n<table role=\"presentation\" class=\"nt-container nt-card\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:600px;max-width:600px;background-color:#ffffff;border:1px solid #e2e8f0;border-radius:8px;\">\n<tr><td style=\"height:24px;font-size:0;line-height:0;\">&nbsp;</td></tr>\n<tr><td class=\"nt-pad\" style=\"padding:0 32px 16px;\"><h1 class=\"nt-text\" style=\"margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;font-size:28px;line-height:1.25;font-weight:700;color:#020817;text-align:left;\">Hello Bo</h1></td></tr><tr><td class=\"nt-pad\" style=\"padding:24px 32px 32px;\"><div class=\"nt-footer\"><p class=\"nt-muted\" style=\"margin:0 0 8px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;font-size:12px;line-height:1.5;color:#475569;\"><a href=\"#unsubscribe\" class=\"nt-muted\" style=\"color:#475569;text-decoration:underline;\">Unsubscribe</a> &middot; <a href=\"#preferences\" class=\"nt-muted\" style=\"color:#475569;text-decoration:underline;\">Manage preferences</a></p></div></td></tr>\n</table>\n</td></tr>\n</table>\n</body>\n</html>",
    "text": "HELLO BO\n\nUnsubscribe: #unsubscribe\nManage preferences: #preferences\n"
  }
}

HTTP 201. Call app_topolo_nurture.broadcasts.get and confirm the test send in testSends[].

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": "bc_missing",
  "addresses": [
    "Rev@Example.com",
    "rev@example.com"
  ]
}

CLI:

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

Captured local response · HTTP 404:

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

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

Refused request · broadcast_archived

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": "bc_d62ef5862dd24edda45dc4b0be926b4c",
  "addresses": [
    "Rev@Example.com",
    "rev@example.com"
  ]
}

CLI:

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

Captured local response · HTTP 409:

{
  "error": {
    "code": "broadcast_archived",
    "message": "An archived broadcast cannot be test sent."
  }
}

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

Refused request · template_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": "bc_b1a68b73f9864f52af15878ef39f0ed9",
  "addresses": [
    "Rev@Example.com",
    "rev@example.com"
  ]
}

CLI:

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

Captured local response · HTTP 422:

{
  "error": {
    "code": "template_required",
    "message": "Choose a template for the broadcast first."
  }
}

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

Verify the result

  • Call app_topolo_nurture.broadcasts.get and confirm the test send in testSends[].

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 broadcasts to find a valid id in this workspace.
  • template_required (HTTP 422): Set templateId with app_topolo_nurture.broadcasts.update first.
  • invalid_template (HTTP 422): Fix each problem in error.details.problems with templates.update, then pin the new version on the draft and retry.
  • template_unavailable (HTTP 422): Pick an active template from this workspace, or update the draft.
  • broadcast_archived (HTTP 409): Create a new broadcast; archived ones cannot be test sent.

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

A test send changes no audience state; its record is kept for audit.

  • Submit broadcast for approval: Submit a draft for approval. Checks that the topic and every segment are active, the schedule is still ahead, and the template renders without errors; pins the template version (the given one, else the current one) so the approver reviews exactly what will be sent. The submitter is recorded and cannot approve it.

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.