Create a proactive trigger

post/api/v1/proactive-triggers

Request

  • Base URL: https://smartwebchat.eu
  • URL: https://smartwebchat.eu/api/v1/proactive-triggers
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional. Choose a unique value per intended creation and send it again on every retry of that same request: the API then returns the stored first response, marked Idempotency-Replayed: true, instead of creating a second resource. Stored for 24 hours per account and route. The request body is compared byte for byte: the same key with a different body (even a different key order) gives 422. The same key while the first request is still running gives 409 with Retry-After. 5xx responses are not stored; the key is released. POST /api/v1/chatbots/{id}/chat accepts the header only with stream: false — with stream: true (the default) it answers 400 before anything is stored.

Request body

chatbotIdstring required
namestring required
triggerType'time_on_page' | 'exit_intent' | 'scroll_depth' | 'page_view_count' | 'inactivity' required
conditionValueobject

{ seconds } | { percent } | { count } | {}

targetPagePatternstring
messageTemplatestring
cooldownMinutesinteger
enabledboolean
priorityinteger

Response

Created ProactiveTrigger

Changes

No recorded changes to this operation across all 1 revision of this API.