Docs
API reference Endpoints Snippets

Snippets

Values your emails share, read at send time: sets whose snippets (entries) take turns.

10 endpoints Base URL · https://api.radarsend.com Auth · X-API-Key

List snippets sets

GET /t/{slug}/api/snippets/

Every set in the account, with the entry showing now, how many are lined up, and when the queue runs out.

dataobject[]
has_moreboolean
next_cursorstring · nullable

Opaque. Pass back as cursor for the next page. Null when there is no continuation — which for most endpoints means the last page, and always means a collection that is not paginated. The account-wide event feed is the exception: it returns a resumable cursor even on its final page (see that endpoint).

200

Sets, by name. Not paginated (an account has at most 50).

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X GET "https://api.radarsend.com/t/acme/api/snippets" \
  -H "X-API-Key: $RADARSEND_API_KEY"
Response 200
{
  "data": [
    {}
  ],
  "next_cursor": "eyJpZCI6IjljMjE4OTVkIn0",
  "has_more": true
}

Create a snippets set

POST /t/{slug}/api/snippets/

Defines a set: its Liquid key, its fields, and how its entries take turns.

fieldsobject[]Required
keystringRequired

Liquid name: {{ snippets.<set>.<key> }}. Lowercase letters, digits and _, starting with a letter.

labelstringRequired
typeenumRequired
One of: text, multiline_text, rich_text, url, image, number, boolean, date, datetime
keystringRequired

Liquid name of the set: {{ snippets.<key>.… }}. Can't change once the set has entries.

namestringRequired
rotationenumRequired

single: one entry, changed by hand. next_upcoming: the entry whose order_field date comes next shows, and rolls off when its date passes. scheduled: each entry starts at its starts_at and shows until the next one starts.

One of: single, next_upcoming, scheduled
order_fieldstring · nullable

next_upcoming only: the key of a date or datetime field.

201

A snippets set, with the entry showing now.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X POST "https://api.radarsend.com/t/acme/api/snippets" \
  -H "X-API-Key: $RADARSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme onboarding",
    "key": "welcome-series",
    "fields": [
      {
        "key": "welcome-series",
        "label": "string",
        "type": "text"
      }
    ],
    "rotation": "single",
    "order_field": "string"
  }'
Response 201
{}

Resolve snippets at a moment

GET /t/{slug}/api/snippets/resolve

What snippets holds for an email sent at at (default now): every set's current values, as Liquid reads them.

at string

The moment to resolve at. Defaults to now.

200

{ at, values: { set: values | null } }.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X GET "https://api.radarsend.com/t/acme/api/snippets/resolve" \
  -H "X-API-Key: $RADARSEND_API_KEY"
Response 200
{}

Get a snippets set

GET /t/{slug}/api/snippets/{set}

The set with all of its entries in queue order, each marked past, current or upcoming.

set string Required

The set's UUID or key.

200

A snippets set, with the entry showing now.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X GET "https://api.radarsend.com/t/acme/api/snippets/{set}" \
  -H "X-API-Key: $RADARSEND_API_KEY"
Response 200
{}

Update a snippets set

PATCH /t/{slug}/api/snippets/{set}

Changes the name, fields or rotation. Once the set has entries, only labels can change and fields can be added: the key, the rotation, and existing fields' keys and types are locked (409 SET_LOCKED).

set string Required

The set's UUID or key.

fieldsobject[]
keystringRequired

Liquid name: {{ snippets.<set>.<key> }}. Lowercase letters, digits and _, starting with a letter.

labelstringRequired
typeenumRequired
One of: text, multiline_text, rich_text, url, image, number, boolean, date, datetime
keystring

Liquid name of the set: {{ snippets.<key>.… }}. Can't change once the set has entries.

namestring
order_fieldstring · nullable

next_upcoming only: the key of a date or datetime field.

rotationenum

single: one entry, changed by hand. next_upcoming: the entry whose order_field date comes next shows, and rolls off when its date passes. scheduled: each entry starts at its starts_at and shows until the next one starts.

One of: single, next_upcoming, scheduled
200

A snippets set, with the entry showing now.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X PATCH "https://api.radarsend.com/t/acme/api/snippets/{set}" \
  -H "X-API-Key: $RADARSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme onboarding",
    "key": "welcome-series",
    "fields": [
      {
        "key": "welcome-series",
        "label": "string",
        "type": "text"
      }
    ],
    "rotation": "single",
    "order_field": "string"
  }'
Response 200
{}

Delete a snippets set

DELETE /t/{slug}/api/snippets/{set}

Refused with 409 HAS_ENTRIES while the set has entries, unless force=true. Emails that read the set then render its fields empty.

set string Required

The set's UUID or key.

force boolean
204

Deleted.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X DELETE "https://api.radarsend.com/t/acme/api/snippets/{set}" \
  -H "X-API-Key: $RADARSEND_API_KEY"

Add an entry

POST /t/{slug}/api/snippets/{set}/entries

Adds an entry to the set's queue. A next_upcoming entry is placed by its date field; a scheduled one by starts_at. A single set holds one entry (409 ENTRY_EXISTS).

set string Required

The set's UUID or key.

valuesobjectRequired

Field key → value. date is YYYY-MM-DD; datetime is an ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone. A field left out is empty.

starts_atstring

scheduled sets only: when the entry starts showing. An ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone.

201

An entry, with when it shows and whether it is past, current or upcoming.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X POST "https://api.radarsend.com/t/acme/api/snippets/{set}/entries" \
  -H "X-API-Key: $RADARSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {},
    "starts_at": "2026-01-15T09:30:00.000Z"
  }'
Response 201
{}

Upsert an entry

PUT /t/{slug}/api/snippets/{set}/entries

Creates the entry, or replaces an existing one, so a sync job can re-run without making duplicates. With match_field (a text or URL field, e.g. a registration link or your own id), it replaces the entry whose value in that field matches, moving it if its date changed. Without it, it replaces the entry at the same place in the queue: the same date (next_upcoming), the same starts_at (scheduled), or the set's one entry (single). Returns 201 when it created an entry, 200 when it replaced one.

set string Required

The set's UUID or key.

valuesobjectRequired

Field key → value. date is YYYY-MM-DD; datetime is an ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone. A field left out is empty.

match_fieldstring

Key of a text or URL field to match an existing entry on.

starts_atstring

scheduled sets only: when the entry starts showing. An ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone.

200

An entry, with when it shows and whether it is past, current or upcoming.

201

An entry, with when it shows and whether it is past, current or upcoming.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X PUT "https://api.radarsend.com/t/acme/api/snippets/{set}/entries" \
  -H "X-API-Key: $RADARSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {},
    "starts_at": "2026-01-15T09:30:00.000Z",
    "match_field": "string"
  }'
Response 200
{}

Update an entry

PATCH /t/{slug}/api/snippets/{set}/entries/{id}

values replaces the entry's values as a whole (a field left out is cleared); starts_at moves a scheduled entry.

set string Required

The set's UUID or key.

id string Required

The entry id.

starts_atstring

scheduled sets only: when the entry starts showing. An ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone.

valuesobject

Field key → value. date is YYYY-MM-DD; datetime is an ISO-8601 instant, or YYYY-MM-DDTHH:MM in the account's time zone. A field left out is empty.

200

An entry, with when it shows and whether it is past, current or upcoming.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X PATCH "https://api.radarsend.com/t/acme/api/snippets/{set}/entries/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \
  -H "X-API-Key: $RADARSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {},
    "starts_at": "2026-01-15T09:30:00.000Z"
  }'
Response 200
{}

Delete an entry

DELETE /t/{slug}/api/snippets/{set}/entries/{id}

Removes the entry from the queue. Emails already sent keep the values they were sent with.

set string Required

The set's UUID or key.

id string Required

The entry id.

204

Deleted.

400

The request failed validation, or a referenced record was rejected.

404

The tenant slug, or the record the path names, does not exist.

Request
curl -X DELETE "https://api.radarsend.com/t/acme/api/snippets/{set}/entries/9c21895d-57f0-4a15-a1df-4dc6835d4f80" \
  -H "X-API-Key: $RADARSEND_API_KEY"