Webhooks

Send every event as data to a web address your developers own: setup in the app, then the full technical contract.

A webhook is a simple idea: instead of your software asking OpsBrain for news, OpsBrain calls your software the moment something happens. Creating an endpoint takes two minutes in the app and no code. Everything after that, the exact data shape, the security checks, the retry behavior, is for whoever writes the receiving code, and it is all here.

Create an endpoint

Endpoints live in

Integrations, under Webhooks

Name it after the consumer, like Warehouse Operations API.

Enter the destination URL. Production requires HTTPS.

Pick the event types you care about. You can change the list any time.

Optionally scope it to specific teams or workflows, and add payload filters, like only when skipped steps are greater than zero.

Save, and copy the signing secret immediately. It starts with prefix and is shown exactly once. If you lose it, rotate to get a new one.

Send a test event before writing any code against live traffic

Press Send test event on the endpoint page. OpsBrain posts a realistic sample, marked flag, signed with your real secret, and shows you the HTTP status and response time immediately.

Is this the right article?

Webhooks are the most technical integration. If you just want messages in a chat tool, or automation without code, start with

communication tools

or

Zapier

An endpoint is the address deliveries go to, plus its settings: which events, which teams, and its own signing secret (a shared password used to prove each delivery really came from OpsBrain). Setting one up is all point and click; the only thing you need from your developers is the URL to send to.

The envelope, field by field

Every delivery is a POST (a message pushed to your URL) with the same JSON body shape, no matter the event type. This body is called the envelope; the payload, the event-specific details, travels inside its data field. Here is a real one:

Example delivery body

What each top-level field means:

Field

Meaning

Unique event id. The same event keeps the same id across retries, so this is your deduplication key.

The event type name, like a sentence in past tense. Stable forever; never translated.

The payload schema version for this event type. Additive changes never bump it; breaking ones do.

When the event happened, in UTC ISO 8601.

True for test events sent from the endpoint page. Log them, do not act on them.

The org the event belongs to: id and name.

Who did it: id and name. Null for events raised by OpsBrain itself, like bottleneck detections.

The event-specific payload. A workflow object has identical fields on every event type that carries one.

Each request also carries these headers:

Header

Same as the body id. Convenient for idempotency before parsing.

Same as the body type.

Same as the body version.

Unix seconds when the request was signed. Used in verification.

The HMAC signature. Verification below.

Always OpsBrain-Webhooks/1.0.

Fields are only ever added

Within a field, fields are never renamed or removed. Write your consumer to ignore fields it does not recognize, and unknown event types too, and it will keep working through every OpsBrain update.

For developers: verify the signature

Anyone who discovers your URL can send requests to it. The signature is an HMAC: a tamper-proof seal computed from the message and your signing secret. Verifying it proves the request came from OpsBrain, was not modified, and is recent. Three checks, in order:

Recompute scheme and compare it, constant-time, against the header value after prefix.

Reject if the timestamp is more than 300 seconds from your clock. This stops replays of captured requests.

Hash the raw request bytes exactly as received. Parse the JSON only after the signature checks out.

To prove your implementation is right without sending a single request, check it against this vector. If your code produces this signature, it is correct:

Test vector

The four classic mistakes

Parsing then re-encoding the JSON before hashing. Key order or whitespace changes break the digest. Always hash the raw bytes.

Comparing signatures with a plain string equality. That leaks timing information; use your language's constant-time comparison.

Skipping the timestamp check. The signature alone does not stop a replay of a captured request.

Sharing one secret across endpoints. Each endpoint has its own, so a leak only ever affects one consumer.

For developers: retries, timeouts and the degraded state

Respond with any 2xx within 10 seconds (connection timeout is 5 seconds). Acknowledge first and do the heavy work on your own queue. What happens next depends on your response:

Your response

OpsBrain does

Marks the delivery as delivered. Done.

Retries with backoff: schedule, up to 5 attempts. A header header from you always wins. Timeouts count as retryable too.

Any other 4xx

Permanent failure, no retry. Your URL or auth is wrong; fix it and press Retry in the delivery log.

After 5 consecutive failed deliveries the endpoint is marked degraded. Nothing is turned off: deliveries keep being attempted, and the very next success restores it to active.

The transition to degraded also raises an event event, exactly once, so you can point a notification rule at it and hear about failing integrations in Slack without an alert storm. And because retries exist, you may see the same event twice: deduplicate on header.

Rotating a secret

Rotating takes effect straight away, with no grace period. That is on purpose:

Press Rotate on the endpoint page. A new secret is generated and shown once.

The old secret stops verifying at that same moment. Deliveries signed after rotation use only the new secret.

Update your consumer immediately after copying, then send a test event to confirm the new secret verifies.

Delivery logs

Every delivery, attempt by attempt, is visible in the

delivery log

Each attempt records the HTTP status, latency, and the first 2000 characters of your response body, which is usually enough to see your own error message.

Failed deliveries have a manual Retry button.

Paused endpoints record skipped deliveries instead of receiving traffic, so a gap in your data is always explainable.

Troubleshooting

What you see

What it means

A rule's quiet period collapsed a repeat. Expected; nothing to fix.

The endpoint is paused. Resume it to receive traffic again.

The consumer URL or auth is wrong. Fix the consumer, then press Retry.

Endpoint shows Degraded

Five or more consecutive failures. Fix the consumer, send a test event, retry a failed delivery, and the next success restores it.