Webhook
A webhook starts a process instance as soon as another system sends an HTTP request to Pantarey: a web form, a shop, a ticket system, a script. The JSON body of the request becomes the message of the instance, unchanged.
Setup
- Turn the start event into a Message Start Event via the wrench.
- Set Start type to Webhook. Pantarey generates the Webhook URL following the pattern
https://api.‹account›.pantarey.io/v1/user-api/‹tenant›/webhook/‹bpmnId›/‹startEventId›/‹token›. - Copy puts the URL on the clipboard.
- Deploy. Only then does the URL accept requests; before that it responds with 404.
- Test webhook opens a dialog with Request payload (JSON) and Send test; the test starts a real process instance and shows the HTTP status.
Call
curl -X POST "https://api.musterfirma.pantarey.io/v1/user-api/twikdjt/webhook/BPMN-…/Event_…/3f2a…" \
-H "Content-Type: application/json" \
-d '{"name": "Bäckerei Huber", "email": "info@baeckerei-huber.example", "anliegen": "Angebot"}'
| Response | Meaning |
|---|---|
201 { "ok": true, "instanceId": "…", "message": "Process triggered …" } |
the process instance is running; the response does not wait for it to finish |
| 400 "Invalid JSON body" | the body is not valid JSON |
| 404 "WebhookStartEvent not found" | wrong URL or wrong token, or the process is not deployed |
| 405 | a method other than POST |
In the process the fields are directly available: name, email, business label for example Anfrage $(name). The Message Schema (⋮) shows the structure once an instance has run; until then, a test call and a look into the Process Explorer under Activities → In/Out help.
Security
The authorization is solely the token in the URL. Anyone who knows the URL can start process instances. Therefore the URL should only be stored in the calling systems, not distributed in emails or documents, and the start event should be recreated if misuse is suspected; this generates a new token. There is no signature or additional secret. The process instance runs under the person who deployed the process.
Example: contact form with forms.app
- Create the form in forms.app, choose Webhook under integrations, enter the Pantarey URL, method POST, format JSON.
- In Pantarey, the webhook start is followed by a database step that saves the request as a "Kontakt" record, and a user task for sales.
- Submit the form, check the new process instance in the Process Explorer.
Frequently asked questions
The test returns 404.
The process is not deployed yet, or nothing changed after a redeploy but the URL was copied from an older process. Copy the URL afresh.
The fields arrive nested.
Many systems wrap the data in data or payload. Set the input expression payload in the first step or work with payload.name in the process.
Can the webhook return what the process produced?
No, it only confirms the start with the instance id. The other system fetches results later or receives them via the service task "HTTP Request (REST)".
Next step
External app: Pantarey itself polls a service regularly.