OriginChainDB
Database endpoints

Receive a webhook delivery

Verify a webhook delivery and write its mapped rows.

POST /v1/tenants/{tenant}/webhooks/{hook_id}

Verify a delivery and write mapped rowsFor signed hooks, calculate the signature over the exact body bytes.
  1. Send the original payloadUse the configured hook and required signature header.
  2. Verify and map its fieldsApply the saved signature and column mappings.
  3. Inspect rows_ingestedHandle missing parent records according to the returned retry guidance.

Before you start

Use your database bearer token.

Connection setup

Create the hook first. For this signed example, add X-Docs-Signature as the hex HMAC-SHA256 of the exact body bytes; the example does not include a signature value.

Path parameters

FieldTypeRequired
tenantstringRequired
hook_idstringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Request body

application/json

Limits and accepted values
  • Arbitrary JSON payload from the sending service (read as raw bytes and parsed as JSON;
  • Content-Type is not checked).
  • With array_path set, the value at that path must be an array (or null = zero rows);
  • otherwise the whole payload is one record.
  • Signature header value: hex_sha256 = hex of HMAC-SHA256(secret, body);
  • stripe_t1 = 't=<unix>,v1=<hex>' over '<t>.<body>'.
  • A mapped row naming a missing foreign-key parent is refused with 503 + Retry-After: 5 so the sender redelivers.
FieldTypeRequiredDescription
FieldsobjectOptionalArbitrary JSON payload from the sending service (read as raw bytes and parsed as JSON; Content-Type is not checked). With array_path set, the value at that path must be an array (or null = zero rows); otherwise the whole payload is one record. Signature header value: hex_sha256 = hex of HMAC-SHA256(secret, body); stripe_t1 = 't=<unix>,v1=<hex>' over '<t>.<body>'. A mapped row naming a missing foreign-key parent is refused with 503 + Retry-After: 5 so the sender redelivers.

Receives a delivery for a registered webhook: when the hook has a signature block, the request must carry an HMAC-SHA256 signature of the raw body in the configured header (a missing or invalid signature returns 401), the JSON payload is mapped through the hook's field mapping, and the resulting rows are written to the destination table; the request also passes the standard bearer-token check.

Read the result

rows_ingested reports mapped rows accepted from this delivery. For a signed hook, calculate the signature over the exact raw body bytes. A foreign-key parent missing at delivery time can return 503 with a retry delay.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd