Skip to main content
POST
/
api
/
ledger
/
v2
/
{ledger}
/
accounts
/
{address}
/
metadata
Add metadata to an account
curl --request POST \
  --url http://localhost/api/ledger/v2/{ledger}/accounts/{address}/metadata \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "admin": "true"
}
'
This response has no body data.
Attach key-value metadata to an account. Use for storing customer IDs, account types, KYC status, or any business context.

Parameters

ledger: The name of the ledger containing the account. (e.g., ledger001) address: The account address to add metadata to. (e.g., users:john:wallet) dryRun: When true, validates the request without persisting changes. Idempotency-Key: Unique key to ensure the request is processed exactly once. (e.g., meta-abc-123)

Request Body

Key-value pairs to add to the account. Existing keys will be overwritten.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Idempotency-Key
string

Use an idempotency key

Path Parameters

ledger
string
required

Name of the ledger.

Example:

"ledger001"

address
string
required

Exact address of the account. It must match the following regular expressions pattern:

^\w+(:\w+)*$
Example:

"users:001"

Query Parameters

dryRun
boolean

Set the dry run mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker.

Example:

true

Body

application/json

metadata

{key}
string

Response