API reference

Campaigns and mail

Campaigns, flows, schedules, templates and the mail sending API.

Scopes for this area: campaigns:read, campaigns:write and campaigns:admin.

66 operations

template

MethodRouteWhat it doesLevelCommand
GET/crm/templatesEmail templates.readrivier campaigns template list
POST/crm/templatesSave an email template.writerivier campaigns template create

campaign

MethodRouteWhat it doesLevelCommand
GET/crm/campaignsCampaigns and newsletters.readrivier campaigns campaign list
POST/crm/campaignsCreate a campaign as a draft.writerivier campaigns campaign create
GET/crm/campaigns/{id}One campaign.readrivier campaigns campaign get
PATCH/crm/campaigns/{id}Change a campaign. Any change takes an approval away.writerivier campaigns campaign update
POST/crm/campaigns/{id}/draft-copyHave a model write the copy for a brief; it lands as an AI-written draft for review.writerivier campaigns campaign draft
GET/crm/campaigns/{id}/checkEverything that must be true before a send: identity, footer, content, audience, rule packs.readrivier campaigns campaign check
GET/crm/campaigns/{id}/previewThe message as one real recipient would receive it.readrivier campaigns campaign preview
POST/crm/campaigns/{id}/testSend a test to one of the project's own addresses.writerivier campaigns campaign test
POST/crm/campaigns/{id}/submitSubmit a draft for review.writerivier campaigns campaign submit
POST/crm/campaigns/{id}/sendSend now, or at a time. Needs a person's approval of this version unless the autonomy settings allow it for an audience this small.writerivier campaigns campaign send
POST/crm/campaigns/{id}/controlPause, resume or cancel.writerivier campaigns campaign control
GET/crm/campaigns/{id}/reportDelivered, bounced, complained, unsubscribed, clicked, by version of the message and by run.readrivier campaigns campaign report

approval

MethodRouteWhat it doesLevelCommand
POST/crm/approvals/campaigns/{id}A person approves exactly this version of a campaign.adminrivier campaigns approval approve
POST/crm/approvals/campaigns/{id}/declineA person sends a campaign back with the reason.adminrivier campaigns approval decline
POST/crm/approvals/flows/{id}A person approves a flow.adminrivier campaigns approval flow
POST/crm/approvals/sequences/{id}A person approves a sequence.adminrivier campaigns approval sequence
GET/crm/approvals/outreachOutreach messages waiting for a person to approve, with the wording the team member wrote.readrivier campaigns approval outreach list
POST/crm/approvals/outreach/{id}/approveA person approves an outreach message, optionally with their own subject and wording.adminrivier campaigns approval outreach approve
POST/crm/approvals/outreach/{id}/rejectA person turns an outreach message down with the reason; the person leaves the sequence.adminrivier campaigns approval outreach reject

flow

MethodRouteWhat it doesLevelCommand
GET/crm/flowsTriggered flows.readrivier campaigns flow list
POST/crm/flowsCreate a flow: a trigger and steps (wait, email, tag, condition).writerivier campaigns flow create
GET/crm/flows/{id}One flow.readrivier campaigns flow get
PUT/crm/flows/{id}Change a flow. A running flow is paused and needs approving again.writerivier campaigns flow update
POST/crm/flows/{id}/activateSwitch a flow on. It then sends by itself, so a person has approved it.writerivier campaigns flow activate
POST/crm/flows/{id}/pausePause a flow; people already in it wait.writerivier campaigns flow pause
GET/crm/flows/{id}/enrollmentsWho is in a flow and where.readrivier campaigns flow enrollments

sequence

MethodRouteWhat it doesLevelCommand
GET/crm/sequencesOutreach sequences: a short series of messages to prospects, written by a team member and approved by a person.readrivier campaigns sequence list
POST/crm/sequencesCreate a sequence: who it is for, a team member, and steps (email, text, WhatsApp, call) with the days to wait before each. The team member writes each message from the step's brief.writerivier campaigns sequence create
GET/crm/sequences/{id}One sequence.readrivier campaigns sequence get
PUT/crm/sequences/{id}Change a sequence. A running sequence is paused and needs approving again.writerivier campaigns sequence update
POST/crm/sequences/{id}/activateSwitch a sequence on. A person has approved it first; each message then waits for approval unless the sequence sends by rule.writerivier campaigns sequence activate
POST/crm/sequences/{id}/pausePause a sequence; people already in it wait.writerivier campaigns sequence pause
POST/crm/sequences/{id}/enrollAdd prospects to a sequence. Anyone who is suppressed, erased, without an address for the first step, or without a recorded basis for being written to is skipped, with the reason.writerivier campaigns sequence enroll
GET/crm/sequences/{id}/enrollmentsWho is in a sequence, where each person is, and why a person left it.readrivier campaigns sequence enrollments
GET/crm/sequences/{id}/resultsResults of a sequence: sent, delivered, opened, clicked, replied, booked, bounced, unsubscribed, complained.readrivier campaigns sequence results

notify push

MethodRouteWhat it doesLevelCommand
GET/notify/push/keyThe public key a page passes to pushManager.subscribe as applicationServerKey.readrivier campaigns notify push key
POST/notify/push/subscriptionsKeep a browser's push subscription under your own id for the person. Only the browsers' push services are accepted as endpoints.writerivier campaigns notify push subscribe
GET/notify/push/subscriptionsA person's push subscriptions, with when each last took a push and whether it has ended.readrivier campaigns notify push list
DELETE/notify/push/subscriptions/{id}Forget a push subscription.writerivier campaigns notify push remove
POST/notify/push/sendPush a notice to a person's browsers (or one subscription): title, body, an address to open, a tag that replaces an earlier notice. A subscription the push service says has ended is marked and raised as campaigns.push.expired.writerivier campaigns notify push send

notify feed

MethodRouteWhat it doesLevelCommand
POST/notify/feedPut a notice in a person's in-app feed.writerivier campaigns notify feed add
GET/notify/feedA person's notices, newest first, with the unread count.readrivier campaigns notify feed list
POST/notify/feed/readMark some or all of a person's notices read.writerivier campaigns notify feed read
DELETE/notify/feed/{id}Remove one notice from a feed.writerivier campaigns notify feed remove

notify template

MethodRouteWhat it doesLevelCommand
GET/notify/templatesThe project's notification template sets, with their languages.readrivier campaigns notify template list
GET/notify/templates/{name}One template set: its fallback language and the words of each channel in each language.readrivier campaigns notify template get
PUT/notify/templates/{name}Create or replace a template set: one name, a fallback language, and per language the push and feed title and body, the mail subject and body, a text, and the approved WhatsApp template with the data keys that fill it.writerivier campaigns notify template put
DELETE/notify/templates/{name}Remove a template set.writerivier campaigns notify template remove
POST/notify/templates/{name}/renderThe words a template set gives in a language for some data: the asked language, then its base language, then the fallback; names with no value are listed.readrivier campaigns notify template render

notify prefs

MethodRouteWhat it doesLevelCommand
GET/notify/preferences/{userRef}A person's notification choices: channel order, address, number, language, muted categories, and whether the feed is on.readrivier campaigns notify prefs get
PUT/notify/preferences/{userRef}Set a person's notification choices.writerivier campaigns notify prefs put

notify

MethodRouteWhat it doesLevelCommand
POST/notify/sendTell a person something: it goes in their feed, then each channel in their order (push, email, text, WhatsApp) is tried until one carries it, falling back when one fails. A template set chooses the words in their language. The same idempotency key sends once.writerivier campaigns notify send

schedule

MethodRouteWhat it doesLevelCommand
GET/workspace/schedulesRecurring actions.readrivier campaigns schedule list
POST/workspace/schedulesRun an action on a cadence.writerivier campaigns schedule create
PATCH/workspace/schedules/{id}Pause, resume or change a schedule.writerivier campaigns schedule update
DELETE/workspace/schedules/{id}Delete a schedule.writerivier campaigns schedule delete

mail send

MethodRouteWhat it doesLevelCommand
POST/mail/sendSend a transactional email (one message per recipient). Use an Idempotency-Key (header or idempotencyKey) so a retry sends once; sandbox: true checks and renders without sending. Refuses suppressed addresses with a structured error. Mail goes out through the project's chosen transport once consent, quiet rules, test mode and the plan's limit allow it.writerivier mail send

mail batch send

MethodRouteWhat it doesLevelCommand
POST/mail/send/batchSend up to 500 different messages in one request. Each item is accepted or rejected on its own; the answer has one result per item and a batchId that groups them.writerivier mail send-batch

mail message

MethodRouteWhat it doesLevelCommand
GET/mail/messagesMessages sent through the mail API, newest first, with their state. Filter by state, address, batch or tag.readrivier mail messages
GET/mail/messages/{id}One message with its content and the timeline of what happened to it (queued, sent, delivered, bounced, opened, clicked) and the transport that carried it, with the reason when it was not the one asked for.readrivier mail message
POST/mail/messages/{id}/cancelCancel a scheduled or queued message before it leaves.writerivier mail cancel
POST/mail/messages/{id}/resendSend a failed message again. When the earlier outcome is unknown (the connection ended mid-send) you must confirm it was not delivered.writerivier mail resend

mail settings

MethodRouteWhat it doesLevelCommand
GET/mail/settingsThe project's mail API settings: rate limit, tracking defaults, transport choice and retention.readrivier mail settings
PUT/mail/settingsChange the project's mail API settings. Choosing the own MTA does not switch it on: it is used only when the transport gate allows it.writerivier mail settings-update