OriginChainDB
Database endpoints

Begin a transaction

Opens a multi-statement transaction at snapshot or serializable isolation and returns its id.

POST /v1/tenants/{tenant}/tx/begin

Open a snapshot for related operationsThis transaction HTTP API is marked as preview.
  1. Choose the isolation levelRequest snapshot or serializable behavior.
  2. Begin the transactionReceive a transaction ID and read snapshot marker.
  3. Reuse the transaction IDKeep subsequent reads and writes in the same transaction.

Before you start

Use your database bearer token.

Connection setup

Keep the returned tx_id for later requests. Finish each open transaction with commit or rollback.

Path parameters

FieldTypeRequired
tenantstringRequired

Query parameters

FieldTypeRequired
isolationstringOptional

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
  • The body is optional and may be empty.
  • isolation is "snapshot_isolation" (default) or "serializable";
  • it may instead be sent as ?isolation=, and the two must agree.
  • Misspellings such as isolation_level are refused with 400.
  • Serializable is refused (501) on a sharded database.
FieldTypeRequired
isolationstringOptional

Read the result

Save tx_id and use it in subsequent transaction requests. read_ts is the snapshot marker, not a row count. The _preview marker identifies this transaction API as preview behavior.

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.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd