Templates
Parameters, sections, slots and blocks for dynamic content.
The Template object 23 fields
Full row only.
MJML source, present for format: mjml. Full row only.
Plain-text alternative. Full row only.
Contact-data expectations for Liquid iteration/access. Full row only.
Which body the send pipeline renders: content_mjml for mjml, content_html for html.
html, mjmlLean list row only — length of groups_schema.
Parameter groupings for the editor. Full row only; lean row carries group_count.
Canonical template ID.
Lean list row only — length of parameters_schema.
Typed top-level parameters. Full row only; the lean row carries parameter_count instead.
Lean list row only — length of sections_schema.
Repeatable sections. Full row only; lean row carries section_count.
Lean list row only — length of slots_schema.
Named slots blocks can fill. Full row only; lean row carries slot_count.
Stable per-tenant key. Usable in place of the UUID in every template path, and as content.template_slug on a broadcast.
Default subject line. Full row only.
Free-text labels for organising your own library. Filter the list with ?tags=, which matches templates carrying ALL of the listed tags.
Full row only — absent from the lean list row.
Present only with ?include_usage=true: { active_drafts, recent_broadcasts }.
Single-template responses only. The current state's number in the version history: one past the newest kept version, so 1 for a template never edited. Changes only when an edit changes something. A broadcast records the number it was built from in content.template_snapshot.template_version.
The Block object 17 fields
Full row only.
Full row only.
Full row only.
Full row only.
Present on both the lean and full row.
Present on both the lean and full row.
Which template slots this block is eligible to fill. A slot accepts the block when it lists ANY one of these; filter the list with ?slot_keys= (also ANY).
Stable per-tenant key. Usable in a slot binding as block_id: <slug>.
Free-text labels for organising your own library — they play no part in slot eligibility. Filter the list with ?tags=, which matches blocks carrying ALL of the listed tags.
Full row only.
Present only with ?include_usage=true: { active_drafts, recent_broadcasts }.
Single-block responses only. The current state's number in the version history: one past the newest kept version, so 1 for a block never edited.
List templates
Every template in the workspace. Returns a LEAN row by default — id, slug, name, format, tags, the four *_count fields and timestamps — dropping the bodies and full schema arrays so the response stays small. Pass ?full=true for the complete rows, and ?include_usage=true to add a usage object per row. Narrow by tag with ?tags= (comma-separated) — a template must carry EVERY listed tag to match, so each extra tag narrows the result. Not paginated: the full list comes back with next_cursor: null.
A page of Template objects, under data.
Every template. Lean rows unless ?full=true.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"data": [
{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}
],
"next_cursor": "eyJpZCI6IjljMjE4OTVkIn0",
"has_more": true
}Create a template
Creates a template. name and content_html are required; format defaults to html. Supply content_mjml and format: mjml for an MJML template. A slug is derived from name when omitted and is unique per workspace — collisions are de-duplicated. The parameter, slot, section and group schemas are validated against the body: an unresolvable reference is rejected.
html, mjmlThe Template object.
The template was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"content_html": "string",
"slug": "acme",
"subject": "Welcome to Acme",
"content_text": "string",
"content_mjml": "string"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"content_html": "string",
"slug": "acme",
"subject": "Welcome to Acme",
"content_text": "string",
"content_mjml": "string"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Get a template
The full template, addressed by UUID or per-tenant slug. Returns the complete row — bodies and schema arrays included, never the lean shape.
The Template object.
The template.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Update a template
Updates a template in place (JSON, not markdown). Only the fields you send change; the parameter/slot/section/group schemas are re-validated against the resulting body. Broadcasts already sent are unaffected — their content was frozen at send time.
html, mjmlThe Template object.
The updated template.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X PUT "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"slug": "acme",
"subject": "Welcome to Acme",
"content_html": "string",
"content_text": "string",
"content_mjml": "string"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'PUT',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"slug": "acme",
"subject": "Welcome to Acme",
"content_html": "string",
"content_text": "string",
"content_mjml": "string"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Delete a template
Deletes a template, addressed by UUID or slug. Refused with 409 IN_USE while it is referenced by an active draft OR a recent broadcast — the counts come back in error.details. Pass ?force=true to delete anyway; that removes the definition in-flight drafts still point at, and there is nothing to restore from unless you exported the markdown first. Returns 204 on success.
The template was deleted.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X DELETE "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Get a template's schemas
Just the typed schemas of a template — parameters_schema, slots_schema, sections_schema, groups_schema, expects_schema — plus template_id, slug and name. The shape a form generator needs, without the bodies. Use binding-options instead when you also need the blocks eligible to fill each slot.
Fingerprint of the format and bodies. A broadcast records the one it was built from (content.template_snapshot.template_content_hash); a different value with the same schemas means the layout changed.
The template's current version number (see Template.version).
The template's identity plus its five typed schema arrays.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/schema" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/schema', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"template_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"version": 0,
"content_hash": "string",
"parameters_schema": [
null
]
}Get a template's binding options
Everything a client needs to build a binding for this template in one call: the parameter, section and group schemas, plus each slot with its eligible_blocks already resolved against the slot's tag filter. Each eligible block carries its slug, name, slot_keys and parameters_schema, so there is no second round trip to /api/blocks. The response is a discovery payload — its shape is documented in prose rather than fully enumerated.
Discovery payload: template_id, slug, name, the parameter/section/group schemas, and the slots with their resolved eligible_blocks.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/binding-options" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/binding-options', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{}Render a template with a binding
Dry-run render: resolves the template against a template_binding and returns the rendered subject, body_html, body_mjml, body_text, slots and template_snapshot. Creates no broadcast and sends nothing.
include_options: true also returns binding_options (the discovery payload) and missing (the validate-binding diagnostics), so an agent can render and inspect in one round trip. It implies lenient: true, which auto-fills missing required parameters/sections/slots with visible placeholders so a partial binding still renders — missing lists what was placeholder-filled.
A template_binding that is structurally invalid returns 400 INVALID_BINDING.
The rendered content: subject, body_html, body_mjml (nullable), body_text (nullable), slots, template_snapshot. With include_options it also carries missing and binding_options. Modelled permissively — a render result is not a fixed shape.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/render" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_binding": {},
"include_options": true,
"lenient": true
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/render', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"template_binding": {},
"include_options": true,
"lenient": true
}),
});
const data = await res.json();{}Validate a template binding
Checks a template_binding against the template without rendering it, and returns structured diagnostics: { valid, issues[] }, where each issue carries a path, machine-readable code, message and fix hint. All problems are reported at once, for an agent iterating on a partial binding. Note it returns 200 with valid: false for an invalid binding — the shape is the same whether valid or not; it does not 400.
Diagnostics: valid (boolean) and issues (an array of { path, code, message, fix }).
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/validate-binding" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_binding": {}
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/validate-binding', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"template_binding": {}
}),
});
const data = await res.json();{
"valid": true,
"issues": [
{}
]
}Import a template from markdown
Creates a new template from a markdown file. Two equivalent body forms are accepted: raw markdown with Content-Type: text/markdown (or text/plain), or { "markdown": "…" } with Content-Type: application/json. Anything else is 400 INVALID_PAYLOAD.
The file carries front matter (kind: template, name, format) plus ## sections for the body and each schema. The body heading must match the format — ## MJML for mjml, ## HTML for html — which is the most common import failure. See the Template import/export guide.
The Template object.
The template was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/import" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/import', {
method: 'POST',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Check a template without saving it
Validates a template in the markdown import format exactly as POST /import would, adds lints for templates converted from another platform (leftover merge tags, MJML 3 syntax, missing unsubscribe link, http:// assets), and — when there are no errors — renders a preview. Pass binding (the same shape as template_binding on /render) to render specific content, such as the original email's; without it, each field's sample is used. Always 200: problems are reported in errors (would block a save or break the email) and warnings, each with a code, message and fix.
{ valid, errors[], warnings[], template, preview: { binding, body_html, body_text } | null }.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/check" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"markdown": "string",
"binding": {}
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates/check', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"markdown": "string",
"binding": {}
}),
});
const data = await res.json();{}Replace a template from markdown
Replaces an existing template's body AND schemas from a markdown file — the same two body forms as POST /api/templates/import. This is a REPLACE, not a merge: a parameter absent from the uploaded file is removed from the template. Broadcasts already sent are unaffected (their content is frozen); the risk is to drafts and sequences still pointing at it, so check /usage first.
The Template object.
The template was replaced.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X PUT "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/import" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/import', {
method: 'PUT',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Export a template as markdown
Returns the template as a text/markdown file — the raw file, not JSON. The round-trip is stable (export twice → identical bytes; bodies stored verbatim), so a scheduled export is a reliable drift check. One wrinkle: if the source had no slug in front matter, the export comes back carrying the generated one.
The template as a markdown file.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/export" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/export', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Duplicate a template
Creates a new template copied from this one: bodies, subject, tags and every schema (the markdown export leaves the subject, tags and expects_schema out). Nothing uses the copy until someone picks it, so it is the safe place to try a change to a template drafts depend on. name defaults to "<name> (copy)"; slug is derived from the name (de-duplicated) unless you pass one, which must be free (409 SLUG_TAKEN). The copy is validated like any new template.
The Template object.
The copy was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/duplicate" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"slug": "acme"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/duplicate', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"slug": "acme"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}List a template's versions
The states this template had before each edit, newest first — the current state is the template itself. Every edit records one (the editor, PUT, a markdown replace, a restore); an edit that changes nothing does not. The latest 50 are kept. Rows carry no bodies: fetch one with GET /versions/{version} or as markdown with /versions/{version}/export. Not paginated.
The template's name in that version.
When an edit replaced it.
update, restoreSet when an API key or MCP connection made the edit.
When this state was saved.
Counts up from 1 per template.
Every kept version, newest first.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"data": [
{
"version": 0,
"name": "Acme onboarding",
"format": "string",
"saved_at": "2026-01-15T09:30:00.000Z",
"replaced_at": "2026-01-15T09:30:00.000Z",
"replaced_by": "update"
}
],
"next_cursor": null,
"has_more": true
}Get a template version
One earlier state of the template, in full: template holds its name, slug, subject, format, bodies, tags and schemas as they were. 404 once it has aged out of the latest 50.
update, restoreThe version.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"version": 0,
"saved_at": "2026-01-15T09:30:00.000Z",
"replaced_at": "2026-01-15T09:30:00.000Z",
"replaced_by": "update",
"replaced_by_user_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"replaced_by_api_key_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80"
}Export a template version as markdown
An earlier state as the same text/markdown file /export returns for the current one — for diffing, or to start a new template from it with POST /api/templates/import.
The version as a markdown file.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/export" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/export', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Restore a template version
Puts the template back the way that version had it — name, subject, format, bodies, tags and every schema. The slug stays as it is now, since broadcasts and clients address the template by it. The restore is an edit like any other: the current state becomes a new version first, so it can be undone the same way. Validated like any edit; a body that breaks a rule added since is refused.
The Template object.
The restored template.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/restore" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/restore', {
method: 'POST',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"subject": "Welcome to Acme",
"format": "html"
}Get a template's usage
How many active drafts and recent broadcasts reference this template — the counts a delete is gated on. Check it before replacing or deleting.
Draft broadcasts still pointing at this template.
Recently-sent broadcasts that used it.
Reference counts.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/usage" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/templates/9c21895d-57f0-4a15-a1df-4dc6835d4f80/usage', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"active_drafts": 0,
"recent_broadcasts": 0
}List content blocks
Every content block in the workspace. Filter to blocks eligible for a slot with ?slot_keys= (comma-separated) and by ?active=. The default row is LEAN — it drops the bodies and groups_schema but KEEPS parameters_schema and sections_schema (the slot picker needs them). Pass ?full=true for the bodies, and ?include_usage=true for a usage object per row. Narrow by tag with ?tags= (comma-separated) — a block must carry EVERY listed tag to match. Note the deliberate difference: slot_keys matches on ANY overlap (it answers "may this block go in that slot?"), while tags matches on ALL (it answers "show me my promo AND seasonal blocks"). Not paginated.
A page of Block objects, under data.
Every content block. Lean rows unless ?full=true.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"data": [
{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}
],
"next_cursor": "eyJpZCI6IjljMjE4OTVkIn0",
"has_more": true
}Create a content block
Creates a content block — reusable content that fills a template slot. name and content_html are required; slot_keys names the slots it is eligible for. A slug is derived from name when omitted, unique per workspace. Blocks share the templates:* scope.
The Block object.
The block was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/blocks" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"content_html": "string",
"slug": "acme",
"slot_keys": [
"string"
],
"tags": [
"string"
],
"content_text": "string"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/blocks', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"content_html": "string",
"slug": "acme",
"slot_keys": [
"string"
],
"tags": [
"string"
],
"content_text": "string"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}Import a content block from markdown
Creates a new content block from a markdown file with kind: block in its front matter. Same two body forms as the template import: raw text/markdown (or text/plain), or { "markdown": "…" } as application/json. There is no markdown REPLACE endpoint for a block — update an existing block through PUT /api/blocks/{id}.
The Block object.
The block was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/blocks/import" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/import', {
method: 'POST',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}Export a content block as markdown
Returns the block as a text/markdown file — the raw file, not JSON. Same round-trippable format as a template export, with kind: block.
The block as a markdown file.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/export" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/export', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Get a content block
The full content block, addressed by UUID or per-tenant slug. Returns the complete row, bodies included, with its current version.
The Block object.
The block.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}Update a content block
Updates a block in place (JSON). Only the fields you send change. The state it replaces is kept as a version (/versions). Broadcasts already sent are unaffected; a block in a rotate or by-rule slot is chosen at send time, so the edit reaches scheduled and in-progress sends that choose it.
The Block object.
The updated block.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X PUT "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"slug": "acme",
"slot_keys": [
"string"
],
"tags": [
"string"
],
"content_html": "string",
"content_text": "string"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'PUT',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"slug": "acme",
"slot_keys": [
"string"
],
"tags": [
"string"
],
"content_html": "string",
"content_text": "string"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}Delete a content block
Deletes a block, addressed by UUID or slug. Refused with 409 IN_USE while it is referenced by an active draft (the count is in error.details). Pass ?force=true to delete anyway. Returns 204 on success.
The block was deleted.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X DELETE "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Duplicate a content block
Creates a new block copied from this one: slot keys, tags, bodies and every schema. The copy starts inactive (active: false): it shares the source's slot keys, so an active copy would join every rotate slot the source can fill and go out in live sends straight away (a by-rule slot names its blocks, so a copy never joins one). Switch it on with PUT /api/blocks/{id} { "active": true } when it's ready. name defaults to "<name> (copy)"; slug is derived from the name (de-duplicated) unless you pass one, which must be free (409 SLUG_TAKEN).
The Block object.
The copy was created.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/duplicate" \
-H "X-API-Key: $RADARSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme onboarding",
"slug": "acme"
}'const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/duplicate', {
method: 'POST',
headers: {
'X-API-Key': process.env.RADARSEND_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Acme onboarding",
"slug": "acme"
}),
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}List a content block's versions
The states this block had before each edit, newest first — the current state is the block itself. Every edit records one (the editor, PUT, a restore); an edit that changes nothing does not, and neither does switching active on or off. The latest 50 are kept. Rows carry no bodies: fetch one with GET /versions/{version} or as markdown with /versions/{version}/export. Not paginated.
The block's name in that version.
When an edit replaced it.
update, restoreSet when an API key or MCP connection made the edit.
When this state was saved.
Counts up from 1 per block.
Every kept version, newest first.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"data": [
{
"version": 0,
"name": "Acme onboarding",
"saved_at": "2026-01-15T09:30:00.000Z",
"replaced_at": "2026-01-15T09:30:00.000Z",
"replaced_by": "update",
"replaced_by_user_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80"
}
],
"next_cursor": null,
"has_more": true
}Get a content block version
One earlier state of the block, in full: block holds its name, slug, slot keys, tags, bodies and schemas as they were. 404 once it has aged out of the latest 50.
update, restoreThe version.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"version": 0,
"saved_at": "2026-01-15T09:30:00.000Z",
"replaced_at": "2026-01-15T09:30:00.000Z",
"replaced_by": "update",
"replaced_by_user_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"replaced_by_api_key_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80"
}Export a content block version as markdown
An earlier state as the same text/markdown file /export returns for the current block — for diffing, or to start a new block from it with POST /api/blocks/import.
The version as a markdown file.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/export" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/export', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();Restore a content block version
Puts the block back the way that version had it — name, slot keys, tags, bodies and schemas. The slug and active stay as they are now. The current state becomes a new version first, so a restore can be undone. Like any edit, a restore reaches broadcasts that choose this block when they send (a rotate or by-rule slot), including scheduled and in-progress sends.
The Block object.
The restored block.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X POST "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/restore" \
-H "X-API-Key: $RADARSEND_API_KEY"const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/versions/{version}/restore', {
method: 'POST',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"tenant_id": "9c21895d-57f0-4a15-a1df-4dc6835d4f80",
"slug": "acme",
"name": "Acme onboarding",
"slot_keys": [
"string"
],
"tags": [
"string"
]
}Get a content block's usage
How many active drafts reference this block — the count a delete is gated on. Unlike a template, a block's gate is active drafts only, not broadcasts.
Draft broadcasts still referencing this block. This is the count the delete gate checks.
Scheduled, sending, paused or completed broadcasts (not archived) that reference this block. Informational — it does not gate deletion.
Templates that reference this block by a fixed (non-slot) reference.
Reference counts.
The request failed validation, or a referenced record was rejected.
The tenant slug, or the record the path names, does not exist.
curl -X GET "https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/usage" \ -H "X-API-Key: $RADARSEND_API_KEY"
const res = await fetch('https://api.radarsend.com/t/acme/api/blocks/9c21895d-57f0-4a15-a1df-4dc6835d4f80/usage', {
method: 'GET',
headers: { 'X-API-Key': process.env.RADARSEND_API_KEY },
});
const data = await res.json();{
"active_drafts": 0,
"recent_broadcasts": 0,
"templates_with_fixed_reference": 0
}