Sarä Help

Webhook

Send answers to a Smart Form from any system that can make a web request.

A webhook source gives your form an address. Anything sent to it with the right secret becomes an answer.

Set it up

  1. Open the form, go to Sources, and pick Webhook (or Other apps). Press Set up.
  2. Copy the address under Send data to. Press Show beside Secret and copy the secret.
  3. Put both in the system that will send the data.
  4. Press Listen for test data, then send one test from that system.
  5. Match the names that came in to your questions (Let Sarä suggest helps), choose how the same person is spotted, and press Save matching.

From then on, each delivery becomes an answer.

Sending

Send a POST request to the source's address:

https:///api/method/hros.hros.api.smart_form_sources.receive?key=<source>

The secret

Send the secret in one of these ways:

WayExample
Header (best)X-Sara-Secret:
Bearer headerAuthorization: Bearer
On the address, for apps that cannot set headers…receive?key=<source>&amp;secret=
Signed bodyX-Sara-Signature: sha256= (X-Hub-Signature-256 works too)

A delivery without the right secret is refused with 401 and logged as Rejected.

The body

  • JSON (Content-Type: application/json) or form data (key=value&amp;key2=value2).
  • Names can be anything — you match them to your questions once.
  • Nested JSON is read with dots: {"contact": {"email": "a@b.co"}} arrives as contact.email.
  • A list of plain values is joined: ["Excel", "CRM"] becomes Excel, CRM.
  • A list of objects is numbered: items.0.name, items.1.name …
  • If the body is a list, its first object is used.
  • Up to 256 KB per delivery.

Example

curl -X POST 'https:///api/method/hros.hros.api.smart_form_sources.receive?key=<source>' \
  -H 'Content-Type: application/json' \
  -H 'X-Sara-Secret: ' \
  -d '{"name": "Aisyah", "email": "aisyah@example.com", "team": "Finance", "start": "2026-12-01"}'

How values are read

Question typeWhat to send
Dropdown, RadioOne of the question's options, written the same way
Multi select, ChecklistA JSON list (["A", "B"]) or the options separated by commas
Checkboxtrue, yes, 1 or on for ticked; anything else is not ticked
DateA date, e.g. 2026-12-01
Everything elseText as it is

Replies

CodeMessageMeaning
202Received.Taken; the answer is made within a few seconds
200Test data received.Kept as the test data (listening, or nothing matched yet)
400Send JSON or form data.The body could not be read
401Unauthorized.Wrong or missing secret, or an unknown address
403This source is switched off.Switch it on in Sources
413Body too large.Over 256 KB
429Too many requests.More than 120 deliveries a minute to one source

Keeping it safe

  • Keep the secret private. Anyone with it can send answers to the form.
  • If it gets out, press New secret. The old one stops working at once; put the new one in your system.
  • Switch the source off to stop it taking deliveries, without losing its matching.

On this page

Webhook · Sarä Help