Skip to content

Test mode: run the draft for a real or fictitious contact with a compressed clock and return the path with the reason for each decision and its text. Sends no emails, calls no webhooks and stores nothing (up to 50 steps)

POST
/v1/flows/{flow}:test
curl --request POST \
--url https://api.replifier.com/v1/flows/flw_01hx0000000000000000000000:test \
--header 'Content-Type: application/json' \
--data '{ "contactId": "example", "contact": { "firstName": "example", "locale": "example", "timezone": "example", "fields": { "additionalProperty": "example" }, "tags": [ "example" ] }, "assumeEvents": true, "message": { "body": "example", "buttonId": "example", "firstMessage": true, "outsideHours": true, "referral": { "sourceId": "example" } } }'
flow
required
string
/^flw_[a-z0-9]{26}$/

Example

flw_01hx0000000000000000000000
Media typeapplication/json
object
contactId

Contact of the brand. Without it, a fictitious one built from contact

string
/^con_[a-z0-9]{26}$/
contact

Fictitious contact data (made-up email; nothing is stored)

object
firstName
string
<= 200 characters /^[^\x00-\x1f\x7f]*$/
locale
string
<= 35 characters
timezone
string
<= 64 characters
fields
object
key
additional properties
Any of:
string
<= 2000 characters
tags
Array<string>
<= 50 items
assumeEvents

Event waits follow the “happened” branch (default: “did not happen”)

boolean
message

Incoming WhatsApp message to try against the draft’s whatsapp_message_received trigger (the answer comes in trigger)

object
body
string
<= 1000 characters
buttonId
string
<= 256 characters
firstMessage
boolean
outsideHours
boolean
referral
object
sourceId
required
string
<= 100 characters

Example generated

{
"contactId": "example",
"contact": {
"firstName": "example",
"locale": "example",
"timezone": "example",
"fields": {
"additionalProperty": "example"
},
"tags": [
"example"
]
},
"assumeEvents": true,
"message": {
"body": "example",
"buttonId": "example",
"firstMessage": true,
"outsideHours": true,
"referral": {
"sourceId": "example"
}
}
}

Flow after the action

Media typeapplication/json
object
contactId
required
string
nullable
fictitious
required
boolean
end
required
string
Allowed values: completed exited limit
eligibility
required
object
key
additional properties
nullable
trigger

Only with message: whether that WhatsApp message would fire the draft’s whatsapp_message_received trigger

object
type
required
string
matched
required
boolean
eligibilityText
required
string
path
required
Array<object>
object
node
required
string
type
required
string
outcome
required
string
reason
required
object
key
additional properties
nullable
text
required
string

Example

{
"end": "completed"
}

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

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