Skip to main content

Quickstart Guide

Record, read back, and manage consent records with Enzuzo's Ledger API.

Overview

Enzuzo's Ledger API is hosted at https://ledger.enzuzo.com. All UUIDs are lowercase 8-4-4-4-12 strings. UUIDs will be normalized to the lowercase format. Timestamps are formatted as RFC 9557 with TZ of Z.

Terminology

  • ledgerId - The unique identifier (a UUID) of each ledger. Generated when new ledgers are created.

  • recordId - The unique identifier (a UUID) of each record. Generated when a record is written to a ledger and returned from the endpoints.

  • ownerId - The unique identifier of the owner of a ledger. Generally the customer's ID. Retrieved from the preexisting Enzuzo admin app.

Quickstart Guide

  1. Get access.

    1. Log in or create an account on https://app.enzuzo.com

    2. Go to the ledger page and create your first ledger. Grab the "Ledger ID" which will be used in the :ledgerId pathname placeholders. This value uniquely identifies that specific ledger chain of records.

    3. Go to the API tokens page and create your first API token. Make sure to save the actual value of the API token somewhere safe as it will not be possible to show it again after it is created. To read entries the token will need at least the ledger:read scope.

  2. Record a consent event

    1. POST /consent/v1/:ledgerId/state with a ConsentState body (see "POST /consent/v1/:ledgerId/state - record consent"). Keep the returned metadata.id as it is the record's ID.

  3. Read it back

    1. GET /consent/v1/:ledgerId/state/:recordId with your bearer token (see "GET /consent/v1/:ledgerId/state/:recordId - read a record back"). On 404 in the first moments after the write, retry with a short backoff.

  4. Change or withdraw

    1. Post a new record for the same user with a different list of categories (see "POST /consent/v1/:ledgerId/state - record consent").

Available endpoints

Endpoint

Description

Persists a consent record asynchronously.

Returns the existing written consent record by ID.

Creates a new ledger chain owned by the given owner and returns it as a Ledger resource.

Partially updates a ledger and returns it as a Ledger resource.

Returns every ledger owned by the given owner as a LedgerList, whose items are Ledger resources.

See also

  • Errors: how the API returns client errors.

  • Schema Reference: the full type definitions for every request and response.

Did this answer your question?