RevoplyAIDocs
API referenceHooks

Start an automation

Starts the flow this hook belongs to for the customer your JSON names, by the paths set in the flow's trigger.

Business plan
POST /hooks/{token}

Try it is off for this endpoint: call it from your own system with the samples.

Starts the flow this hook belongs to for the customer your JSON names, by the paths set in the flow's trigger. The run is queued, not finished: 202 accepted returns its id at once, and flow.completed or flow.failed tells you how it ended. Send an Idempotency-Key to make retries safe.

Path Parameters

token*string

The hook's token, as the flow builder shows it once: rvh_ and 43 URL-safe characters. Keep it secret; regenerate it if it leaks.

Match^rvh_[A-Za-z0-9_-]{37,95}$

Header Parameters

Idempotency-Key?string

Your own id for this request, such as the order number. A repeat with the same key starts nothing new and answers 200 duplicate with the first run's id.

Lengthlength <= 200

Request Body

application/json

Any JSON object up to 64 KB. The flow's trigger settings name the paths its phone number, name, language and saved values are read from.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

# --fail-with-body exits non-zero on 4xx/5xx and still prints the problem JSON;# branch on its "status" field, never on "detail".curl --fail-with-body -X POST "https://api.revoplyai.com/hooks/{token}" \  -H "Idempotency-Key: $(uuidgen)" \  -H "Content-Type: application/json" \  -d '{  "order": {    "id": "10482",    "status": "shipped"  },  "customer": {    "name": "نورة العتيبي",    "phone": "+966501234567"  }}'
{  "id": "8f14e45f-ceea-467a-9575-5b1e2c7d3a90",  "status": "duplicate",  "detail": null}