Preview the rendered emails
Rendered emails for a lead, every step and variant.
GET/api/v1/campaigns/{id}/preview
Parameters
Path
| Name | In | Description |
|---|---|---|
idrequired | path | The record's id. |
Query
| Name | In | Description |
|---|---|---|
lead_id | query | Lead to render. |
step | query, integer | Step number, default 1. |
variant | query | a, b or c: read a template step in this variation instead of the one the lead was dealt. |
mailbox_id | query | The sending mailbox the signature and sender variables come from; the first campaign mailbox when omitted. |
Example
curl
curl -X GET "https://crm.ashwanth.dev/api/v1/campaigns/{id}/preview" \
-H "Authorization: Bearer $SALES_ENGINE_API_KEY"CLI
sales-engine campaigns preview <id>Response
A 200 with the result under data, on creation too. Errors come back as an error object with a stable code; see Errors.
Shape
{
"data": { ... }
}Run it below to see the live shape for your workspace.
Try it
Runs against this server, as the workspace behind the key. Kept in this page while you browse the docs, gone on reload, never stored. Signed in to the app? Leave it blank and the call runs as you.
Path
requiredThe record's id.
Query
Lead to render.
Step number, default 1.
a, b or c: read a template step in this variation instead of the one the lead was dealt.
The sending mailbox the signature and sender variables come from; the first campaign mailbox when omitted.
Request
GET /api/v1/campaigns/%7Bid%7D/preview
Fill the path first.