Skip to content

Preview of how the email would look with what the AI wrote, to review it before sending

GET
/v1/campaigns/{campaign}/personalization/sample
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.

campaign
required
string
/^cmp_[a-z0-9]{26}$/

Example

cmp_01hx0000000000000000000000
size
string
/^\d{1,2}$/
html
string
Allowed values: 0 1
contactIds

Up to 10 comma-separated ids

string
/^con_[a-z0-9]{26}(,con_[a-z0-9]{26}){0,9}$/

Up to 10 comma-separated ids

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"
}
}