LOCALHOST
All pages
API reference

Privacy

Closing an account and downloading its data, for the mobile app.

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.

#

Close

Full-access key

POST /legal/closing

Ask to close your account. It closes after `days`; until then `POST /legal/closing/keep` keeps it.

Request body CloseIn

NameTypeNotes
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 revoked
  • 403 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>"
  }'
#

Keep

Full-access key

POST /legal/closing/keep

Changed your mind: your account stays open.

Responses

  • 200 ClosingOut
  • 401 no key, or a key that was revoked
  • 403 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

NameTypeNotes
key * string
account * string
title * string
detail * string
url * string
can_give_up * boolean
amount * string
names * list[string]

CloseIn

NameTypeNotes
give_up_balance boolean default false
give_up_names boolean default false
reason string default ""

ClosingOut

NameTypeNotes
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 ""