Skip to content

Inbound Webhooks: Start an Automation from Another System

Inbound Webhooks in DEP let an external system (such as an e-commerce store, CRM, or payment service) send an HTTP POST JSON request to a dedicated endpoint URL to:

  • Start an automation via the Inbound Webhook trigger.
  • Resume an automation run paused at a Wait for webhook step.

You can view your full endpoint URL in the portal under Developer › Inbound webhooks. If the page shows a note to contact our team instead of a URL, ask our team for your endpoint URL. The URL has the form:

https://<your-webhook-host>/api/v1/hooks/<account_id>/<slug>
  1. Create an inbound webhook endpoint

    Open Developer › Inbound webhooks and click Create endpoint. Enter a Name, Slug, choose an Authentication method (HMAC-SHA256 signature (recommended)), and save your Secret.

  2. Connect it to an automation trigger

    Open Automation Builder › Triggers, create or edit a trigger of type Inbound Webhook, select the endpoint you created, and set Contact phone JSON path (default $.phone).

  3. Activate the automation

    Make sure the linked automation is active so incoming requests can start runs.

  • Method: POST
  • Header: Content-Type: application/json
  • Body: valid JSON object
  • Maximum body size: 1 MB (1,048,576 bytes)

Choose an authentication method when creating the endpoint in Developer › Inbound webhooks (we recommend HMAC-SHA256):

MethodHeader / VerificationNotes
HMAC-SHA256 (recommended)X-Signature header (or the configured custom header name). Value is lowercase hex HMAC-SHA256 of the exact raw body (optional sha256= prefix).Sign the exact bytes you send.
Bearer tokenAuthorization: Bearer <secret>Exact secret match.
NoneNo authentication header requiredOnly for testing or private URLs.

curl + OpenSSL

Terminal window
BODY='{"phone":"6281234567890","order_id":"INV-1001","status":"paid"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | sed 's/^.* //')
curl -X POST 'https://<your-webhook-host>/api/v1/hooks/<account_id>/<slug>' \
-H 'Content-Type: application/json' \
-H "X-Signature: sha256=$SIG" \
-d "$BODY"

Node.js

import crypto from 'node:crypto';
const body = JSON.stringify({
phone: '6281234567890',
order_id: 'INV-1001',
status: 'paid',
});
const sig = crypto
.createHmac('sha256', process.env.WEBHOOK_SECRET)
.update(body)
.digest('hex');
await fetch('https://<your-webhook-host>/api/v1/hooks/<account_id>/<slug>', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Signature': `sha256=${sig}`,
},
body,
});

Python

import hashlib
import hmac
import os
import requests
body = b'{"phone":"6281234567890","order_id":"INV-1001","status":"paid"}'
sig = hmac.new(
os.environ["WEBHOOK_SECRET"].encode(),
body,
hashlib.sha256,
).hexdigest()
requests.post(
"https://<your-webhook-host>/api/v1/hooks/<account_id>/<slug>",
data=body,
headers={
"Content-Type": "application/json",
"X-Signature": f"sha256={sig}",
},
)
  • The phone number is read from Contact phone JSON path (default $.phone, dot path such as $.customer.phone).
  • Matching compares digits only (e.g., 6281234567890).
  • The contact must already exist in DEP and have a conversation. Otherwise the request is still accepted (202) with started: 0 and a reason.

The JSON payload and request headers are exposed as flow variables:

VariableSourceNotes
{{webhook.<field>}}Top-level JSON bodyExample: {{webhook.order_id}}, {{webhook.status}}.
{{webhook.customer.name}}Nested objectsUp to 3 levels deep; deeper objects are stored as JSON text.
{{webhook.items}}Arrays, numbers, booleansStored as JSON text / text.
{{webhook.headers.<lowercase>}}HTTP request headersauthorization and the HMAC signature header are removed when a run is started.
{{webhook.endpoint_id}}Endpoint metadataID of the inbound webhook endpoint that received the request.
{{trigger.kind}}Trigger metadataValue is webhook.
StatusExample BodyMeaning
202 Accepted{"started":1,"reason":null}Trigger matched and automation run was queued.
202 Accepted{"started":0,"reason":"contact_not_found"}No contact found for the extracted phone number.
202 Accepted{"started":0,"reason":"contact_has_no_conversation"}Contact exists but has no conversation.
202 Accepted{"status":"captured","run_id":"…"}Resumed a run waiting at a Wait for webhook step.
204 No Content(empty)No waiting run and no active trigger on this endpoint.
400 Bad Request{"error":"invalid JSON: …"}Invalid JSON body, or correlation ID extraction failed with no active trigger.
401 Unauthorized{"error":"authentication failed"}Bearer or HMAC authentication failed.
404 Not Found{"error":"webhook endpoint not found"}Endpoint not found or inactive.
413 Payload Too Large{"error":"payload exceeds 1 MB limit"}Body exceeds 1 MB.
5xx—Temporary error; retry with backoff.

started counts the runs queued; automation rules (such as once per contact) can still stop a run.

To resume a Wait for webhook step, configure Correlation ID source on the endpoint (default $.correlation_id, supporting $.field from the JSON body or header.X-Name from HTTP headers). Matching is per account and one-shot.

Processing order for each incoming request: waiting runs are checked first; if none match, active automation triggers are started.

After a run resumes, {{webhook.*}} holds the new request’s data, {{webhook.status}} is captured (it overrides a body field named status), and {{webhook_status}} is received. If no request arrives before the Wait for webhook timeout, the run continues with {{webhook_status}} set to timeout.

  • No automatic deduplication: every accepted POST starts a new run.
  • Do not retry 2xx responses (202 or 204).
  • Retry only on 5xx or network errors with exponential backoff.
  • HMAC-SHA256 signatures do not include a timestamp, so keep your secret private and rotate it by editing the endpoint in Developer › Inbound webhooks.
  • Maximum 50 endpoints per account.
  • Maximum body size 1 MB.
  • Slug must match ^[a-z0-9][a-z0-9-]{0,63}$ (lowercase letters, numbers, and hyphens, max 64 characters).
  • No fixed request-rate limit is published for this route; keep request rates reasonable.