Skip to main content

POST /ledger/v1/:ownerId - create a new ledger

Creates a new ledger chain owned by the given owner and returns it as a Ledger resource. The new ledger's ID is metadata.id.

Path parameters

Name

Type

Notes

ownerId

UUID string

The owner the new ledger will belong to. Must be the owner the token belongs to.

Authentication

  • Send a bearer token: Authorization: Bearer <token>.

  • The token must belong to the ownerId in the path. A token of another owner is rejected with 403 Forbidden.

  • The token must carry the ledger:create scope. A token without it is rejected with 403 Forbidden, whose detail names the missing scope.

Request body - optional. Either empty, or a JSON object (CreateLedgerRequestBody):

Field

Type

Notes

name

string, optional

Human-readable name for the ledger. When omitted (or the body is empty) the name is the empty string "". Can be changed later (see "PATCH /ledger/v1/:ownerId/:ledgerId - update a ledger").

Responses

Status

Body

Meaning

201 Created

Ledger

The ledger as created. metadata.id is the new ledger's ID, used as ledgerId in other paths. metadata.name is "" when none was given.

400 Bad Request

application/problem+json

The body is invalid or a path parameter is not valid, for instance not a valid UUID

401 Unauthorized

application/problem+json

Bearer token is missing, malformed, expired, or revoked

403 Forbidden

application/problem+json

The token belongs to another owner, or lacks the ledger:create scope.

413 Content Too Large

application/problem+json

Body size is > 64KiB.

415 Unsupported Media Type

application/problem+json

Declared charset is unknown

4xx

application/problem+json

Other client errors (see "Errors").

Example (illustrative values)

POST https://ledger.enzuzo.com/ledger/v1/5d2e8c71-9a4b-4f3e-b6d0-1c7a2e9f4b83
Authorization: Bearer <token>
{ "name": "Marketing site" }
HTTP/1.1 201 Created
{
  "apiVersion": "v1",
  "kind": "Ledger",
  "metadata": {
    "name": "Marketing site",
    "id": "5ae66dc4-2a1a-4c84-b559-c7959100bb24",
    "ownerId": "5d2e8c71-9a4b-4f3e-b6d0-1c7a2e9f4b83",
    "createdAt": "2026-10-15T17:22:05.123Z"
  }
}
Did this answer your question?