Ingest API reference

The complete contract for pushing events into OpsBrain: auth, shapes, idempotency, signatures, limits and error codes.

This is a technical reference, written for developers. One endpoint, one auth header, one body shape: the full contract every event source uses, whether the caller is an ERP, a Zap, an n8n flow or ten lines of your own code.

Endpoint and authentication

Everything goes to path, where the source id is part of the ingest URL shown on the source's page. HTTPS only in production.

Authentication is the source's bearer token: header. The token authenticates exactly one source in one organization; there are no org-wide ingest credentials.

Tokens are created, rotated and revoked on the source. See

event sources

Not writing code?

You can set up and test everything about inbound events from the app, without this page. Start with

the event sources article

Request and response shapes

The body has two fields. That is the entire schema:

Request

field is your name for what happened, any string up to 200 characters. Lowercase dot-separated names in past tense, like pattern, keep your trigger list readable. Event names are machine identifiers: never translated, and never changed once triggers depend on them.

field is any JSON object. Nest it however your domain looks; triggers address fields with dot paths like path.

Response

202 means stored, not matched

Matching and run creation happen in the background. A 202 tells you the event is safely stored. What it matched and which runs it created shows up in the inbound activity log a moment later.

Test mode and idempotency

Add flag to the body and the event is stored in the activity log, evaluated against triggers for display, but never creates runs. Use it to rehearse a new integration against production configuration without producing work:

Test mode

For exactly-once delivery, send a unique header header per logical event. Replays of the same key are acknowledged without storing anything twice:

Replay of an already-seen key

Idempotency keys guard against network retries. For business-level duplicates, like an ERP that emits the same shipment event twice a minute apart, use a dedupe template on the trigger; the two mechanisms are complementary.

Signature header

When the source has a signing secret, every request must carry a signature over the timestamp and the raw body:

Header format

part is the Unix timestamp, in seconds, at signing time.

part is the hex HMAC-SHA256 of the string timestamp, dot, raw body, keyed with the signing secret.

OpsBrain rejects requests whose timestamp is more than 5 minutes from its clock.

The scheme is byte-for-byte the one OpsBrain uses for outbound webhooks, so the same code and test vector work in both directions. Details and worked code in

the webhooks article

The sample endpoint

Same auth, same body shape, different path, one purpose: feed the trigger mapper. Samples never create runs, never touch triggers, and simply become the payload the trigger builder detects fields from:

Storing a sample

Send one representative event per event name before configuring triggers. Thirty seconds here saves all the path-typing later.

Limits and retention

Rate limit: 120 requests per minute per source. Beyond it, HTTP status; retry with backoff.

Payload cap: 256 KB per request body. Beyond it, HTTP status. Send identifiers, not documents; a trigger needs the shipment id, not the scanned invoice.

Retention: the inbound event log is pruned after 30 days. Runs keep their own copy of the mapped data forever, so nothing a run was built from ever disappears.

Error codes

Status

Meaning

What to do

Missing or invalid bearer token, or a failed signature check.

Check the token against the source, and the signature clock if signing is on. Rotated tokens invalidate old ones immediately.

The source is paused.

Resume the source in OpsBrain, or treat it as an expected pause window. Configuration is intact.

The body exceeds 256 KB.

Slim the payload to identifiers and the fields triggers actually filter or prefill on.

The body failed validation: missing event name, a name over 200 characters, or data that is not a JSON object.

Read the validation errors in the response body; they name the exact field.

More than 120 requests in a minute from this source.

Wait and retry. If your system sends in bursts, group events before sending or spread them out.

Build retries on the status code

429 and network failures deserve automatic retries with backoff. 401, 413 and 422 do not; they will fail identically until a human fixes the cause. 409 is your call: retry after the maintenance window if pausing is routine for you.