LOCALHOST
All pages
API reference

Account

Who the key belongs to and what it may do.

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.

#

Me

Any key

GET /me

The account behind the key, in short: what `lh login` checks.

Responses

  • 200 OK
  • 401 no key, or a key that was revoked
Example request
curl -X GET "$API/me" \
  -H "Authorization: Bearer $LH_API_KEY"
#

Whoami

Any key

GET /accounts/me

The account behind this API key, and what the key may do.

Responses

  • 200 AccountOut
  • 401 no key, or a key that was revoked
Example request
curl -X GET "$API/accounts/me" \
  -H "Authorization: Bearer $LH_API_KEY"

Shapes

The objects these endpoints send and receive.

AccountOut

NameTypeNotes
slug * string
name * string
kind * string
tin * string
vat_number * string
whatsapp * string
key_name * string
scopes * list[string]