> ## Documentation Index
> Fetch the complete documentation index at: https://docs.burokku.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow webhooks

> Start a Burokku workflow from your own server: the webhook URL, signed calls with X-Burokku-Signature, the JSON body, answers and limits.

A workflow can start when another system calls its own private URL. Use it to run a workflow from your server, a script, a form tool or any service that can send an HTTP POST. The call's JSON becomes values the workflow's messages and conditions can use.

Webhooks need a signed-in Burokku account. To build the workflow itself, see [Workflows and recurring buys](https://docs.burokku.app/web-app/workflows.md).

## Set it up

**1. Add the Webhook trigger**

In [Automations](https://app.burokku.app/automations), create a workflow and pick **Webhook** (Incoming HTTP call) under **Triggers**. Add the steps that should follow, then save the workflow. A workflow gets its URL only once it's saved with this trigger.

**2. Make the URL**

Select the trigger and choose **Make URL**. Copy it right away: Burokku shows it once and keeps only a fingerprint of it, so it can't show it again.

**3. Turn on Require signature (recommended)**

Switch on **Require signature**. Burokku shows a secret once. Copy it to your server. From then on, only calls signed with that secret are accepted.

**4. Turn the workflow on**

Calls are turned away while the workflow is paused.

**Rotate URL** makes a new URL. The old one stops working at once, and anything still calling it gets `404`. Saving the workflow with a different trigger, deleting the workflow or deleting your account also removes the URL.

## The call

| | |
| - | - |
| Method | `POST` only. Other methods get `405`. |
| URL | `https://app.burokku.app/api/hooks/wf/<token>`. The token is 43 characters of letters, digits, `-` and `_`. |
| Body | JSON, or empty. At most 16,384 bytes, UTF-8. |
| `Content-Type` | `application/json` (or another `application/…+json` type). Not needed for an empty body. |
| Signature | `X-Burokku-Signature`, when the workflow requires it. |

```bash theme={null}
curl -X POST 'https://app.burokku.app/api/hooks/wf/<token>' \
  -H 'content-type: application/json' \
  -d '{"event":"deposit","amount":"250","note":"Hello from my server"}'
```

The trigger's settings also show a ready-made curl example for your workflow, with your URL and secret filled in right after you make them.

## Signing calls

With **Require signature** on, each call needs this header:

```text theme={null}
X-Burokku-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256>
```

* `t` is the current Unix time, in seconds.
* `v1` is the HMAC-SHA256, in hex, of the time, a dot and the raw body (`<t>.<body>`), made with your secret.
* The call must arrive within 5 minutes of `t`, either way.
* Each signature works once. Sending the same signed call again gets `401`, so a captured call can't be replayed.
* Sign the exact bytes you send. Re-encoding the JSON after signing breaks the signature.

```bash theme={null}
BODY='{"event":"deposit","amount":"250"}'
T=$(date +%s)
SIG=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac '<your secret>' | sed 's/^.* //')
curl -X POST 'https://app.burokku.app/api/hooks/wf/<token>' \
  -H 'content-type: application/json' \
  -H "X-Burokku-Signature: t=$T,v1=$SIG" \
  -d "$BODY"
```

Turning **Require signature** off and on again makes a new secret. The old secret stops working.

> [!NOTE]
>
> Secrets made before 1 November 2026 also accept an older header, `X-Burokku-Signature-256: sha256=<hex HMAC-SHA256 of the body>`, which has no time in it. If yours does, the trigger shows **Signature format is old**. Switch your sender to `X-Burokku-Signature`: after the first call in the new format, the old one stops working for that URL.

## What the workflow gets

The body becomes values named `payload.<path>`:

* `{"user":{"name":"Ann"},"tags":["a"]}` gives `payload.user.name` = `Ann` and `payload.tags.0` = `a`.
* A body that's a single value, like `"hi"` or `5`, is `payload`.
* Numbers and booleans become text. Line breaks and other control characters become spaces.
* Keys that aren't letters, digits or `_` (up to 40 characters) are skipped, as is anything nested deeper than 8 levels.
* At most 40 values are kept, each up to 1,000 characters.

Messages can show a value, like `{{payload.amount}}`, and conditions can compare it. Numbers compare as numbers. Other text can only be checked with = and ≠. A value the call didn't send counts as "no".

A call never sets an amount, token, chain or address. Steps that move money read only their own saved settings and keep their own checks. A **Trade** or **Exchange trade** step in a workflow started by a webhook runs only when the webhook requires signed calls. Burokku AI never reads the values a call sends.

To try it without calling the URL, put a **Sample payload** in the trigger's settings and use **Test run**. **Run now** runs the workflow without a payload.

## Answers

Accepted calls get `202` at once, with a delivery id. The workflow then runs in the background.

```json theme={null}
{ "id": "<delivery id>" }
```

Every other answer is a JSON body with an `error`:

| Status | `error` | Why |
| - | - | - |
| `400` | `bad_request` | The body isn't valid UTF-8 or valid JSON. |
| `401` | `bad_signature` | The signature is missing, wrong, more than 5 minutes off, or already used. |
| `404` | `not_found` | No workflow takes calls at this URL. The answer doesn't say why. |
| `405` | `method_not_allowed` | The method wasn't `POST`. |
| `409` | `paused` | The workflow is off. |
| `413` | `too_large` | The body is over 16,384 bytes. |
| `415` | `unsupported_type` | A body was sent without a JSON `Content-Type`. |
| `429` | `rate_limited` | Over a limit below. Wait for the `Retry-After` header, in seconds. |
| `503` | `unavailable` | Burokku couldn't take the call. Try again after `Retry-After` (30 seconds). |

## Limits

* **Per workflow:** at most one run every 10 seconds, and 200 a day. The day is the UTC day. Over either, the answer is `429` with `Retry-After` set to when the next call would be accepted.
* **Per caller:** about 60 calls a minute from one IP address. Over that, `429` with `Retry-After: 60`.
* A call turned away with `429` doesn't use up its signature, so you can send it again later if it's still within 5 minutes of `t`.

There are no CORS headers, so a web page on another site can't read the answers. Call the URL from a server.

## See each call

The trigger's settings list **Recent calls**: each delivery id with how its run went (for example Success, Failed, Needs signature or Skipped). Each run is also in the workflow's run history, marked "Webhook called" with its delivery id.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.