Preview of how the email would look with what the AI wrote, to review it before sending
GET
/v1/campaigns/{campaign}/personalization/sample
const url = 'https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/personalization/sample?html=0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/personalization/sample?html=0' \ --header 'Authorization: Bearer <token>'Without contactIds: up to size contacts with data and up to 2 without data (to see the fallback value). usesFallback lists the vars.* tags in the email that the contact does not have. Sends nothing: sending or scheduling still goes through the same approvals as any campaign. html=1 includes the compiled HTML.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”campaign
required
string
Example
cmp_01hx0000000000000000000000Query Parameters
Section titled “Query Parameters”size
string
html
string
contactIds
Up to 10 comma-separated ids
string
Up to 10 comma-separated ids
Responses
Section titled “Responses”Sample
Media typeapplication/json
object
contactsWithData
required
number
variables
required
Array<string>
usedInEmail
required
Array<string>
samples
required
Array<object>
object
contactId
required
string
hasData
required
boolean
vars
required
object
key
additional properties
string
usesFallback
required
Array<string>
subject
required
string
text
required
string
html
string
Example generated
{ "contactsWithData": 1, "variables": [ "example" ], "usedInEmail": [ "example" ], "samples": [ { "contactId": "example", "hasData": true, "vars": { "additionalProperty": "example" }, "usesFallback": [ "example" ], "subject": "example", "text": "example", "html": "example" } ]}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}