Get-or-create the persistent Experience and invoke engagement_decision.
Returns 202 immediately. On a cache hit the response carries status=COMPLETED and widget_data; otherwise status=PENDING and the caller polls GET /experiences/{experience_id}.
Body
Required
-
Opt-in webhook delivery for the completed decision (Phase 1).
The secret is the HMAC-SHA256 key for X-Thankly-Signature; it is held only for the duration of the background task and never persisted.
-
Per-request generation tuning + multi-variant output (v2 Phase 4).
Request-scoped: composed with the playbook's must_mention/must_not_mention/ tone_hint without changing the playbook.
variant_count > 1returns N independent completions for partner-run A/B testing (capped at MAX_VARIANTS).
POST
/engage
curl \
--request POST 'http://api.example.com/engage' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"external_customer_id":"string","playbook_id":"string","callback":{"url":"https://example.com","secret":"string"},"journey_day":42,"overrides":{"benefit_emphasis":["string"],"suppress_features":["string"],"seasonal_context":"string","cta_label":"string","variant_count":1}}'
Request examples
{
"external_customer_id": "string",
"playbook_id": "string",
"callback": {
"url": "https://example.com",
"secret": "string"
},
"journey_day": 42,
"overrides": {
"benefit_emphasis": [
"string"
],
"suppress_features": [
"string"
],
"seasonal_context": "string",
"cta_label": "string",
"variant_count": 1
}
}
Response examples (202)
{
"experience_id": "string",
"access_token": "string",
"session_id": "string",
"status": "string",
"widget_data": {},
"decision_id": "string"
}
Response examples (422)
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"ctx": {}
}
]
}