LOCALHOST
All pages
API reference

Signatures

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.

#

List Signatures

mail:read

GET /signatures/

Responses

  • 200 list[object]
  • 401 no key, or a key that was revoked
  • 403 the key lacks the permission
Example request
curl -X GET "$API/signatures/" \
  -H "Authorization: Bearer $LH_API_KEY"
#

Get Signature

mail:read

GET /signatures/{name}

One name's signature: its details, design, the designs there are, and how it looks (HTML and plain text).

Parameters

NameTypeNotes
name * in path string

Responses

  • 200 object
  • 401 no key, or a key that was revoked
  • 403 the key lacks the permission
Example request
curl -X GET "$API/signatures/<name>" \
  -H "Authorization: Bearer $LH_API_KEY"
#

Update Signature

mail:write

PATCH /signatures/{name}

Change the details, pick a design, give your own HTML, turn it on or off. Only the fields given change.

Parameters

NameTypeNotes
name * in path string

Request body SignaturePatch

NameTypeNotes
business string | null
tagline string | null
phone string | null
whatsapp string | null
website string | null
address string | null
accent string | null
logo_url string | null
disclaimer string | null
replies string | null
banner_text string | null
banner_url string | null
design string | null
custom_html string | null
on boolean | null

Responses

  • 200 object
  • 401 no key, or a key that was revoked
  • 403 the key lacks the permission
Example request
curl -X PATCH "$API/signatures/<name>" \
  -H "Authorization: Bearer $LH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "business": "<business>",
    "tagline": "<tagline>",
    "phone": "<phone>",
    "whatsapp": "<whatsapp>",
    "website": "<website>",
    "address": "<address>",
    "accent": "<accent>",
    "logo_url": "<logo_url>",
    "disclaimer": "<disclaimer>",
    "replies": "<replies>",
    "banner_text": "<banner_text>",
    "banner_url": "<banner_url>",
    "design": "<design>",
    "custom_html": "<custom_html>",
    "on": true
  }'
#

Add Signature Designs

mail:write

POST /signatures/{name}/designs

Start Signature designs on this name: every design, your own HTML and the offer line, monthly from the wallet.

Parameters

NameTypeNotes
name * in path string

Responses

  • 200 object
  • 401 no key, or a key that was revoked
  • 403 the key lacks the permission
Example request
curl -X POST "$API/signatures/<name>/designs" \
  -H "Authorization: Bearer $LH_API_KEY"

Shapes

The objects these endpoints send and receive.

SignaturePatch

NameTypeNotes
business string | null
tagline string | null
phone string | null
whatsapp string | null
website string | null
address string | null
accent string | null
logo_url string | null
disclaimer string | null
replies string | null
banner_text string | null
banner_url string | null
design string | null
custom_html string | null
on boolean | null