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.
GET /resellers/clients
Responses
200 list[ClientOut ]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/clients" \
-H "Authorization: Bearer $LH_API_KEY"
#
Add Client
clients:write
POST /resellers/clients
Request body ClientIn
Name Type Notes
name *
string
kind
string
default business
Responses
201 ClientOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/clients" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>"
}'
GET /resellers/commissions
Responses
Example request
curl -X GET "$API/resellers/commissions" \
-H "Authorization: Bearer $LH_API_KEY"
#
Book Domains
domains:read
GET /resellers/domains
`client` is a client id from /clients; `expiring_within` a number of days.
Parameters
Name Type Notes
client query
integer | null
status query
string
default ""
expiring_within query
integer | null
q query
string
default ""
Responses
200 list[PortfolioDomainOut ]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/domains" \
-H "Authorization: Bearer $LH_API_KEY"
GET /resellers/events
Every event a webhook can subscribe to. "domain.*" subscribes to a whole group.
Responses
Example request
curl -X GET "$API/resellers/events"
GET /resellers/me
Responses
200 MeOut
401 no key, or a key that was revoked
Example request
curl -X GET "$API/resellers/me" \
-H "Authorization: Bearer $LH_API_KEY"
GET /resellers/prices
What you pay against the list price, for names and plans.
Responses
200 list[PriceOut ]
401 no key, or a key that was revoked
Example request
curl -X GET "$API/resellers/prices" \
-H "Authorization: Bearer $LH_API_KEY"
GET /resellers/pricing
Your own prices to your clients: on or off, and the markup per group (percent over list price).
Responses
200 PricingOut
401 no key, or a key that was revoked
Example request
curl -X GET "$API/resellers/pricing" \
-H "Authorization: Bearer $LH_API_KEY"
#
Put Pricing
billing:write
PUT /resellers/pricing
Turning own prices on needs agree=true once: you present them as your own, never as LOCALHOST's (partner terms).
Request body PricingIn
Name Type Notes
own_prices *
boolean
markups
object of integer
default {}
agree
boolean
default false
Responses
200 PricingOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PUT "$API/resellers/pricing" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"own_prices": true
}'
GET /resellers/sites
Parameters
Name Type Notes
client query
integer | null
state query
string
default ""
Responses
200 list[PortfolioSiteOut ]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/sites" \
-H "Authorization: Bearer $LH_API_KEY"
#
List Webhooks
webhooks:read
GET /resellers/webhooks
Responses
200 list[WebhookOut ]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/webhooks" \
-H "Authorization: Bearer $LH_API_KEY"
#
Create Webhook
webhooks:write
POST /resellers/webhooks
The answer carries the signing secret, once.
Request body WebhookIn
Name Type Notes
url *
string
events
list[string]
default []
description
string
default ""
Responses
201 WebhookCreated
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/webhooks" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "<url>"
}'
GET /resellers/clients/{link_id}
Parameters
Name Type Notes
link_id * in path
integer
Responses
200 ClientOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/clients/<link_id>" \
-H "Authorization: Bearer $LH_API_KEY"
POST /resellers/domains/bulk
action: renew | auto_renew_on | auto_renew_off | lock | unlock | nameservers. Each name succeeds or fails on its own. Renewals are paid from your wallet (pay_from "partner") or each client's ("client").
Request body BulkIn
Name Type Notes
action *
string
names *
list[string]
nameservers
list[string]
default []
pay_from
string
default partner
Responses
200 BulkOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/domains/bulk" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Idempotency-Key: <a fresh unique string>" \
-H "Content-Type: application/json" \
-d '{
"action": "<action>",
"names": [
"<names>"
]
}'
#
Update Webhook
webhooks:write
PATCH /resellers/webhooks/{hook_id}
Parameters
Name Type Notes
hook_id * in path
integer
Request body WebhookPatch
Name Type Notes
url
string | null
events
list[string] | null
active
boolean | null
description
string | null
Responses
200 WebhookOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PATCH "$API/resellers/webhooks/<hook_id>" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "<url>",
"events": [
"<events>"
],
"active": true,
"description": "<description>"
}'
#
Delete Webhook
webhooks:write
DELETE /resellers/webhooks/{hook_id}
Parameters
Name Type Notes
hook_id * in path
integer
Responses
204 No Content
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X DELETE "$API/resellers/webhooks/<hook_id>" \
-H "Authorization: Bearer $LH_API_KEY"
POST /resellers/clients/{link_id}/fund
Parameters
Name Type Notes
link_id * in path
integer
Request body FundIn
Name Type Notes
amount *
number | string
note
string
default ""
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/clients/<link_id>/fund" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Idempotency-Key: <a fresh unique string>" \
-H "Content-Type: application/json" \
-d '{
"amount": 1
}'
POST /resellers/clients/{link_id}/handoff
Parameters
Name Type Notes
link_id * in path
integer
Request body HandoffIn
Name Type Notes
email *
string
Responses
200 ClientOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/clients/<link_id>/handoff" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "<email>"
}'
#
Cancel Handoff
clients:write
DELETE /resellers/clients/{link_id}/handoff
Parameters
Name Type Notes
link_id * in path
integer
Responses
200 ClientOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X DELETE "$API/resellers/clients/<link_id>/handoff" \
-H "Authorization: Bearer $LH_API_KEY"
#
Site Action
sites:write
POST /resellers/sites/{site_id}/{action}
Parameters
Name Type Notes
site_id * in path
uuid
action * in path
string
Responses
200 PortfolioSiteOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/sites/<site_id>/<action>" \
-H "Authorization: Bearer $LH_API_KEY"
#
Deliveries
webhooks:read
GET /resellers/webhooks/{hook_id}/deliveries
Parameters
Name Type Notes
hook_id * in path
integer
status query
string
default ""
Responses
200 list[DeliveryOut ]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/resellers/webhooks/<hook_id>/deliveries" \
-H "Authorization: Bearer $LH_API_KEY"
#
Rotate Secret
webhooks:write
POST /resellers/webhooks/{hook_id}/rotate-secret
Parameters
Name Type Notes
hook_id * in path
integer
Responses
200 WebhookCreated
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/webhooks/<hook_id>/rotate-secret" \
-H "Authorization: Bearer $LH_API_KEY"
#
Test Webhook
webhooks:write
POST /resellers/webhooks/{hook_id}/test
Parameters
Name Type Notes
hook_id * in path
integer
Responses
200 DeliveryOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/webhooks/<hook_id>/test" \
-H "Authorization: Bearer $LH_API_KEY"
#
Redeliver
webhooks:write
POST /resellers/webhooks/{hook_id}/deliveries/{delivery_id}/redeliver
Parameters
Name Type Notes
hook_id * in path
integer
delivery_id * in path
integer
Responses
200 DeliveryOut
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/resellers/webhooks/<hook_id>/deliveries/<delivery_id>/redeliver" \
-H "Authorization: Bearer $LH_API_KEY"
Shapes
The objects these endpoints send and receive.
BulkIn
Name Type Notes
action *
string
names *
list[string]
nameservers
list[string]
default []
pay_from
string
default partner
BulkOut
Name Type Notes
done *
list[string]
failed *
list[object]
ClientIn
Name Type Notes
name *
string
kind
string
default business
ClientOut
Name Type Notes
id *
integer
slug *
string
name *
string
state *
string
source *
string
managed *
boolean
joined_at *
datetime
domains *
integer
sites *
integer
wallet_balance *
string | null
CommissionOut
Name Type Notes
invoice *
string
client *
string
kind *
string
pct *
integer | null
amount *
string
created_at *
datetime
DeliveryOut
Name Type Notes
id *
integer
event_id *
string
event *
string
status *
string
attempts *
integer
response_code *
integer | null
response_body *
string
created_at *
datetime
delivered_at *
datetime | null
next_attempt_at *
datetime | null
FundIn
Name Type Notes
amount *
number | string
note
string
default ""
HandoffIn
Name Type Notes
email *
string
MeOut
Name Type Notes
account *
string
name *
string
tier *
string
discount_pct *
integer
commission_pct *
integer
referral_code *
string
referral_url *
string
wallet_balance *
string
currency *
string
clients *
integer
white_label_host *
string | null
PortfolioDomainOut
Name Type Notes
name *
string
account *
string
client_id *
integer | null
status *
string
expires_at *
datetime | null
auto_renew *
boolean
locked *
boolean
nameservers *
list[string]
PortfolioSiteOut
Name Type Notes
id *
string
slug *
string
name *
string
account *
string
client_id *
integer | null
state *
string
desired *
string
url *
string
PriceOut
Name Type Notes
kind *
string
ref *
string
list_price *
string
your_price *
string
client_price *
string
period *
string
PricingIn
Name Type Notes
own_prices *
boolean
markups
object of integer
default {}
agree
boolean
default false
PricingOut
Name Type Notes
own_prices *
boolean
markups *
object of integer
agreed_at *
datetime | null
groups *
object of string
WebhookCreated
Name Type Notes
id *
integer
url *
string
events *
list[string]
active *
boolean
description *
string
failures_in_a_row *
integer
last_success_at *
datetime | null
created_at *
datetime
secret *
string
WebhookIn
Name Type Notes
url *
string
events
list[string]
default []
description
string
default ""
WebhookOut
Name Type Notes
id *
integer
url *
string
events *
list[string]
active *
boolean
description *
string
failures_in_a_row *
integer
last_success_at *
datetime | null
created_at *
datetime
WebhookPatch
Name Type Notes
url
string | null
events
list[string] | null
active
boolean | null
description
string | null