Engage Customer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.thankly.ai/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Thankly MCP server": {
    "url": "https://docs.thankly.ai/mcp"
  }
}

Close
POST /engage

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

application/json

Body Required

  • external_customer_id string Required
  • playbook_id string Required
  • callback object | null

    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.

    Hide callback attributes Show callback attributes object | null
    • url string(uri) Required

      Minimum length is 1, maximum length is 2083.

    • secret string Required
  • journey_day integer | null
  • overrides object | null

    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 > 1 returns N independent completions for partner-run A/B testing (capped at MAX_VARIANTS).

    Hide overrides attributes Show overrides attributes object | null
    • benefit_emphasis array[string] | null
    • suppress_features array[string] | null
    • seasonal_context string | null
    • cta_label string | null
    • variant_count integer

      Default value is 1.

Responses

  • 202 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • experience_id string Required
    • access_token string Required
    • session_id string | null
    • status string Required
    • widget_data object | null

      Additional properties are allowed.

    • decision_id string | null
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
      • input
      • ctx object
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": {}
    }
  ]
}