Every call needs Authorization: Bearer lh_… unless marked No key needed ; the example uses $API for https://api.localhost.co.zw and $LH_API_KEY for your key. A * marks a required field.
#
Closing
Full-access key
GET /legal/closing
What closing your account would do, what's in the way, and whether you've already asked.
Responses
200 ClosingOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/legal/closing" \
-H "Authorization: Bearer $LH_API_KEY"
POST /legal/closing
Ask to close your account. It closes after `days`; until then `POST /legal/closing/keep` keeps it.
Request body CloseIn
Name Type Notes
give_up_balance
boolean
default false
give_up_names
boolean
default false
reason
string
default ""
Responses
200 ClosingOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/legal/closing" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"give_up_balance": false,
"give_up_names": false,
"reason": "<reason>"
}'
GET /legal/data
Everything we hold about you and your accounts, as JSON.
Responses
200 OK
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/legal/data" \
-H "Authorization: Bearer $LH_API_KEY"
POST /legal/closing/keep
Changed your mind: your account stays open.
Responses
200 ClosingOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/legal/closing/keep" \
-H "Authorization: Bearer $LH_API_KEY"
Shapes
The objects these endpoints send and receive.
BlockerOut
Name Type Notes
key *
string
account *
string
title *
string
detail *
string
url *
string
can_give_up *
boolean
amount *
string
names *
list[string]
CloseIn
Name Type Notes
give_up_balance
boolean
default false
give_up_names
boolean
default false
reason
string
default ""
ClosingOut
Name Type Notes
state *
string
closes_at
datetime | null
days *
integer
closing_accounts *
list[string]
leaving_accounts *
list[string]
blockers *
list[BlockerOut ]
goes *
list[string]
ends *
list[string]
refused
string
default ""