Inbound Webhook Trigger
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"event": "invoice_paid",
"orderId": "A-1042"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: 'invoice_paid', orderId: 'A-1042'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks"
payload = {
"event": "invoice_paid",
"orderId": "A-1042"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Scenarios (Advanced)
Inbound Webhook Trigger
Fire the ‘Custom webhook called’ scenario trigger from an external system. Any HTTP method is accepted; the request’s method, headers, query and body are available to scenario conditions and data injection.
POST
https://{projectID}.texterchat.com/server/api/v2
/
scenarios
/
webhooks
Inbound Webhook Trigger
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"event": "invoice_paid",
"orderId": "A-1042"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: 'invoice_paid', orderId: 'A-1042'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/scenarios/webhooks"
payload = {
"event": "invoice_paid",
"orderId": "A-1042"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Fire the Custom webhook called scenario trigger (
app.scenarios.customTriggers.webhook) from an external system. Any scenario whose trigger event is Custom webhook called runs, with the request’s HTTP method, headers, query parameters and body available to its conditions and data injection.
Any HTTP method is accepted (POST, GET, PUT, …). The endpoint always responds 200 immediately - scenario execution is asynchronous; use List Scenario Runs to inspect what ran.
⚠ No authentication is performed on this endpoint. Anyone who knows the URL can fire the trigger. Always send a secret header (e.g. X-Webhook-Secret) from your system and add a condition in the scenario that checks the header value before any action runs.Body
application/json
Free-form JSON - exposed to scenario conditions and data injection
Response
200
Always returned - the trigger was dispatched (whether or not any scenario matched)