Skip to content

Check a campaign before sending and return the traffic light (campaigns.write)

POST
/v1/preflight
curl --request POST \
--url https://api.replifier.com/v1/preflight \
--header 'Content-Type: application/json' \
--data '{ "campaignId": "example" }'

Green: all good. Yellow: warnings that do not block sending. Red: sending stops (409 preflight_red). It also checks that the email links respond (HEAD, 10 at most).

Media typeapplication/json
object
campaignId
required
string
/^cmp_[a-z0-9]{26}$/

Example generated

{
"campaignId": "example"
}

Report

Media typeapplication/json
object
id
required
string
subjectType
required
string
Allowed values: campaign template_version flow_version
subjectId
required
string
verdict
required
string
Allowed values: green yellow red
items
required
Array<object>
object
code
required
string
area
required
string
status
required
string
Allowed values: fail warn info pass
message
required
string
fix
required
string
nullable
params
required
object
key
additional properties
nullable
locations

Email blocks it points to (accessibility review).

Array<object>
object
path
required
string
blockId
string
createdAt
required
string

Example

{
"subjectType": "campaign",
"verdict": "green",
"items": [
{
"status": "fail"
}
]
}

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

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

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

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