Check a campaign before sending and return the traffic light (campaigns.write)
POST
/v1/preflight
const url = 'https://api.replifier.com/v1/preflight';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"campaignId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
campaignId
required
string
Example generated
{ "campaignId": "example"}Responses
Section titled “Responses”Report
Media typeapplication/json
object
id
required
string
subjectType
required
string
subjectId
required
string
verdict
required
string
items
required
Array<object>
object
code
required
string
area
required
string
status
required
string
message
required
string
fix
required
string
params
required
object
key
additional properties
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" }}