PATCH /v1/accounts/{id}
Set an account's type, institution or nickname. The bank's own name is never changed.
Auth. Send the token in the X-Ledger-Token header.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required |
Request body
application/json: object
| Field | Type | Required | Description |
|---|---|---|---|
account_type | string or null | optional | Must be on the account type list. null clears it. |
institution | string or null | optional | Your name for the bank, such as Chase or Capital One. null clears it. |
nickname | string or null | optional | Your name for the account. null clears it. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The updated account | Account |
400 | Request rejected | Error |
404 | Request rejected | Error |
429 | Too many requests from this client address. Wait the number of seconds in Retry-After, then try again. | Error |
Example response
{
"id": "string",
"conn_id": "string",
"org_name": "string",
"institution": "string",
"name": "string",
"nickname": "string",
"display_name": "string",
"created_at": "2026-10-11T00:00:00Z",
"updated_at": "2026-10-11T00:00:00Z",
"currency": "string",
"account_type": "string",
"balance_cents": 0,
"available_cents": 0,
"balance_date": "2026-10-11T00:00:00Z"
}
Code samples
Set KEY to your own token first.
curl
curl \
-X PATCH \
-H X-Ledger-Token:$KEY \
-H "Content-Type: application/json" \
-d '{"account_type": "string", "institution": "string", "nickname": "string"}' \
"https://api.sasek.org/ledger/v1/accounts/{id}"
JavaScript
const res = await fetch("https://api.sasek.org/ledger/v1/accounts/{id}", {
method: "PATCH",
headers: { "X-Ledger-Token": KEY, "Content-Type": "application/json" },
body: JSON.stringify({
"account_type": "string",
"institution": "string",
"nickname": "string"
}),
});
const data = await res.json();
Python
import json
import os
import urllib.request
payload = { 'account_type': 'string',
'institution': 'string',
'nickname': 'string'}
request = urllib.request.Request(
"https://api.sasek.org/ledger/v1/accounts/{id}",
method="PATCH",
headers={
"X-Ledger-Token": os.environ["KEY"],
"Content-Type": "application/json",
},
data=json.dumps(payload).encode(),
)
with urllib.request.urlopen(request) as response:
print(json.load(response))