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.
#
Website Kinds
websites:read
GET /sitekit/kinds
The kinds of business a website can be for, what each gets (a shop, bookings …) and its starting sections.
Responses
200 list[object]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/sitekit/kinds" \
-H "Authorization: Bearer $LH_API_KEY"
#
List Websites
websites:read
GET /sitekit/websites
Responses
200 list[object]
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/sitekit/websites" \
-H "Authorization: Bearer $LH_API_KEY"
#
Create Website
websites:write
POST /sitekit/websites
A new website of a kind, with its example sections to change. Within what the plan includes, or one more at the extra-website price a month with add_extra (its first month from the wallet now). It isn't live until published.
Request body WebsiteIn
Name Type Notes
kind *
string
name *
string
tagline
string
default ""
whatsapp
string
default ""
phone
string
default ""
city
string
default ""
palette
string
default ""
fonts
string
default ""
add_extra
boolean
default false
Responses
201 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/sitekit/websites" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "<kind>",
"name": "<name>"
}'
#
Get Website
websites:read
GET /sitekit/websites/{pk}
The whole draft: business details, look, every section with its fields, what can be added, and the live state.
Parameters
Name Type Notes
pk * in path
string
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X GET "$API/sitekit/websites/<pk>" \
-H "Authorization: Bearer $LH_API_KEY"
#
Remove Website
websites:write
DELETE /sitekit/websites/{pk}
Take it offline, stop Google listing it, end an extra-website charge, and delete it. confirm is its name. Names that pointed at it keep answering with the holding page. This can't be undone.
Parameters
Name Type Notes
pk * in path
string
confirm * query
string
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X DELETE "$API/sitekit/websites/<pk>?confirm=<confirm>" \
-H "Authorization: Bearer $LH_API_KEY"
#
Set Business
websites:write
PUT /sitekit/websites/{pk}/business
The business's details every section can use: name, tagline, contacts, hours, social links.
Parameters
Name Type Notes
pk * in path
string
Request body BusinessIn
Name Type Notes
name
string | null
tagline
string | null
whatsapp
string | null
phone
string | null
email
string | null
address
string | null
city
string | null
hours
list[object] | null
socials
list[object] | null
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PUT "$API/sitekit/websites/<pk>/business" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>",
"tagline": "<tagline>",
"whatsapp": "<whatsapp>",
"phone": "<phone>",
"email": "<email>",
"address": "<address>",
"city": "<city>",
"hours": [
{}
],
"socials": [
{}
]
}'
#
Change Website Kind
websites:write
POST /sitekit/websites/{pk}/kind
Change what the website is for. Its sections start again from the new kind's, keeping every section the owner changed or added and their details and look. Only the draft changes until it is published.
Parameters
Name Type Notes
pk * in path
string
Request body KindIn
Name Type Notes
kind *
string
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/sitekit/websites/<pk>/kind" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "<kind>"
}'
#
Set Look
websites:write
PUT /sitekit/websites/{pk}/look
The theme: palette, fonts, shape, density (names from the website's look.options), and the WhatsApp button.
Parameters
Name Type Notes
pk * in path
string
Request body LookIn
Name Type Notes
palette
string | null
fonts
string | null
shape
string | null
density
string | null
whatsapp_button
boolean | null
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PUT "$API/sitekit/websites/<pk>/look" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"palette": "<palette>",
"fonts": "<fonts>",
"shape": "<shape>",
"density": "<density>",
"whatsapp_button": true
}'
#
Publish Website
websites:write
POST /sitekit/websites/{pk}/publish
Put the draft live for visitors. Refused (409) while must-do checklist items are open, unless anyway=true.
Parameters
Name Type Notes
pk * in path
string
Request body PublishIn
Name Type Notes
anyway
boolean
default false
address
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/sitekit/websites/<pk>/publish" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"anyway": false,
"address": "<address>"
}'
#
Add Section
websites:write
POST /sitekit/websites/{pk}/sections
Add a section of a kind from can_add, after a given section (or in the natural place).
Parameters
Name Type Notes
pk * in path
string
Request body SectionAdd
Name Type Notes
type *
string
after
string
default ""
Responses
201 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/sitekit/websites/<pk>/sections" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "<type>"
}'
#
Unpublish Website
websites:write
POST /sitekit/websites/{pk}/unpublish
Take it offline. The draft is kept; publish again any time.
Parameters
Name Type Notes
pk * in path
string
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/sitekit/websites/<pk>/unpublish" \
-H "Authorization: Bearer $LH_API_KEY"
#
Update Section
websites:write
PATCH /sitekit/websites/{pk}/sections/{sid}
Change a section's words, pictures, layout or tone; only what's given changes. header and footer are sections too.
Parameters
Name Type Notes
pk * in path
string
sid * in path
string
Request body SectionPatch
Name Type Notes
content
object | null
layout
string | null
tone
string | null
nav
string | null
hidden
boolean | null
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PATCH "$API/sitekit/websites/<pk>/sections/<sid>" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {},
"layout": "<layout>",
"tone": "<tone>",
"nav": "<nav>",
"hidden": true
}'
#
Remove Section
websites:write
DELETE /sitekit/websites/{pk}/sections/{sid}
Parameters
Name Type Notes
pk * in path
string
sid * in path
string
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X DELETE "$API/sitekit/websites/<pk>/sections/<sid>" \
-H "Authorization: Bearer $LH_API_KEY"
#
Move Section
websites:write
POST /sitekit/websites/{pk}/sections/{sid}/move
Parameters
Name Type Notes
pk * in path
string
sid * in path
string
Request body MoveIn
Name Type Notes
step *
integer
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X POST "$API/sitekit/websites/<pk>/sections/<sid>/move" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"step": 1
}'
#
Set Photo
websites:write
PUT /sitekit/websites/{pk}/sections/{sid}/photo
Put a picture from an https address into an image field (path c.image, c.items.2.photo; the paths are in get_website's fields), or the business's logo (path business.logo). A copy is kept with the website: upright, its location data removed, smaller.
Parameters
Name Type Notes
pk * in path
string
sid * in path
string
Request body PhotoIn
Name Type Notes
path *
string
url *
string
alt
string
default ""
Responses
200 object
401 no key, or a key that was revoked403 the key lacks the permission
Example request
curl -X PUT "$API/sitekit/websites/<pk>/sections/<sid>/photo" \
-H "Authorization: Bearer $LH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"path": "<path>",
"url": "<url>"
}'
Shapes
The objects these endpoints send and receive.
BusinessIn
Name Type Notes
name
string | null
tagline
string | null
whatsapp
string | null
phone
string | null
email
string | null
address
string | null
city
string | null
hours
list[object] | null
socials
list[object] | null
KindIn
Name Type Notes
kind *
string
LookIn
Name Type Notes
palette
string | null
fonts
string | null
shape
string | null
density
string | null
whatsapp_button
boolean | null
MoveIn
Name Type Notes
step *
integer
PhotoIn
Name Type Notes
path *
string
url *
string
alt
string
default ""
PublishIn
Name Type Notes
anyway
boolean
default false
address
string
default ""
SectionAdd
Name Type Notes
type *
string
after
string
default ""
SectionPatch
Name Type Notes
content
object | null
layout
string | null
tone
string | null
nav
string | null
hidden
boolean | null
WebsiteIn
Name Type Notes
kind *
string
name *
string
tagline
string
default ""
whatsapp
string
default ""
phone
string
default ""
city
string
default ""
palette
string
default ""
fonts
string
default ""
add_extra
boolean
default false