OriginChainDB
Database endpoints

Configure a webhook

Map incoming JSON payloads to table rows, with optional HMAC signature verification.

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

Define how deliveries become table rowsWithout a signature block, the hook accepts unsigned deliveries.
  1. Prepare the destination tableRegister the schema before configuring the hook.
  2. Map payload fieldsConnect JSON paths to destination columns.
  3. Save verification settingsConfigure signing when needed; send only the secret setting's name.

Before you start

Use your database bearer token.

Connection setup

Register the destination table first. For the signed example, configure OC_DOCS_WEBHOOK_SECRET on the server and send only its setting name.

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
  • schema is the destination table id (namespace.table) and must already exist.
  • field_mapping maps each destination column name to a JSONPath-style expression (e.g. $.event.id, $.items[0].id) and must have at least one entry.
  • Without a signature block the hook accepts unsigned deliveries.
FieldTypeRequiredDescription
array_pathstringOptional—
field_mappingobjectRequired—
idempotency_key_pathstringOptional—
schemastringRequired—
signatureobjectOptionalformat is one of: hex_sha256 (default), stripe_t1. secret_env_var is the NAME of a setting on the database server that holds the shared secret; the secret value itself is never sent or returned.
Fields in signature
FieldTypeRequired
formatstringOptional
headerstringRequired
secret_env_varstringRequired

Read the result

The response is the saved mapping configuration. field_mapping maps destination columns to payload paths. Without a signature block, the hook accepts unsigned deliveries; choose that behavior deliberately.

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.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd