API
Templates and campaigns API
Create email content, save a draft, schedule, or send.
Templates
/api/v1/templatesScope
/api/v1/templatesScope
Fields
nameRequiredemail_typesubjectRequiredpreview_texthtml_bodyRequiredtext_bodyis_activeReturns
id, variables
email_type is any short label you choose, such as welcome, promo, or password_reset. Leave it blank to store general.
text_body is the plain-text version. Leave it out to build one from the HTML. VeloSend adds the unsubscribe link to the end of it, after the line Sent with VeloSend when your project shows the badge.
Saving finds every variable used in the content and returns them. See Template variables for the syntax, types, and defaults.
/api/v1/templates/{id}Scope
Returns
the template, including text_body and variables (name, type, default_value, required)
/api/v1/templates/{id}Scope
Fields
nameRequiredemail_typesubjectRequiredpreview_texthtml_bodyRequiredtext_bodyis_activeReturns
id, variables
Variables added to the content are added, and variables removed from the content are removed. Settings on the variables that stay are kept.
/api/v1/templates/{id}/variablesScope
Fields
variables (required)
Sets the type, default, and required switch for variables already in the template.
/api/v1/templates/{id}/previewScope
Fields
emailfirst_namelast_namevariablesReturns
subject, preheader, html, text, warnings
Shows exactly what a send with the same values produces. Nothing is sent.
/api/v1/templates/{id}Scope
Deletes the template. It can be restored for your plan's retention period. To stop a template being used without deleting it, save it with is_active false.
Campaigns
/api/v1/campaignsScope
/api/v1/campaignsScope
Fields
nameRequiredtemplate_idsubjectpreview_texthtml_bodylist_idRequiredinclude_riskyscheduled_atA campaign sends only to list_id, and skips contacts whose address failed the email check. Risky contacts are skipped too unless include_risky is true. Send template_id, or send both subject and html_body. Leave scheduled_at empty to save a draft. Only draft and scheduled campaigns can be edited.
A campaign fills variables from each contact. A variable with no matching contact field uses the default saved on the template, or stays blank and adds a warning to that address in the delivery log.
/api/v1/campaigns/{id}Scope
/api/v1/campaigns/{id}Scope
Fields
nameRequiredsubjectRequiredhtml_bodyRequiredpreview_textlist_idRequiredinclude_riskyscheduled_atclear_schedule/api/v1/campaigns/{id}Scope
Deletes the campaign and stops it if it was scheduled. It can be restored for your plan's retention period.
Send a list
/api/v1/campaigns/{id}/sendScope
Starts sending to subscribed contacts on the campaign list who have not already received this campaign, and answers straight away with HTTP 202: status is sending, total is how many people are still waiting for the campaign, and queued is how many get it now. VeloSend sends in the background. If sending stops halfway, it carries on where it stopped. A failed address is tried up to 3 times. Bounced and unsubscribed contacts are skipped. When the project's daily sending limit is reached, the campaign becomes scheduled for the time the limit resets, and the rest are sent automatically. The answer also has warnings: [{ "code": "starter_text", "message": "…" }] when the email still has a starter design's sample text or a link to example.com. The campaign sends either way.
Follow the progress with GET /api/v1/campaigns/{id}, which returns status with sent_count, failed_count and bounced_count. A campaign that cannot start answers at once with the reason: without a connected sending email, the call returns HTTP 409 with the code mailbox_not_connected, and a campaign that is already sending returns HTTP 409 with the code already_sending.
Internal templates
Templates have an `is_internal` field (true or false). Set it to true on `POST /api/v1/templates` or `PUT /api/v1/templates/{id}` for an email to your own team; the email is then sent without the subscriber lines in the footer. Leaving the field out of a `PUT` keeps the saved value. `GET` returns it on every template.