LOCALHOST
All pages
API reference

Support

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.

#

Conversations

Any key

GET /support/conversations

The person's questions to us, newest first.

Responses

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

Ask

Any key

POST /support/conversations

A new question. Answered by email to the person's address (and in the panel's chat).

Request body AskIn

NameTypeNotes
subject string default ""
message * string

Responses

  • 201 object
  • 401 no key, or a key that was revoked
Example request
curl -X POST "$API/support/conversations" \
  -H "Authorization: Bearer $LH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<message>"
  }'
#

Conversation

Any key

GET /support/conversations/{pk}

One conversation with every message we can show them.

Parameters

NameTypeNotes
pk * in path integer

Responses

  • 200 object
  • 401 no key, or a key that was revoked
Example request
curl -X GET "$API/support/conversations/<pk>" \
  -H "Authorization: Bearer $LH_API_KEY"
#

Reply

Any key

POST /support/conversations/{pk}/reply

Add to a conversation (it opens again if we had closed it).

Parameters

NameTypeNotes
pk * in path integer

Request body ReplyIn

NameTypeNotes
message * string

Responses

  • 200 object
  • 401 no key, or a key that was revoked
Example request
curl -X POST "$API/support/conversations/<pk>/reply" \
  -H "Authorization: Bearer $LH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<message>"
  }'

Shapes

The objects these endpoints send and receive.

AskIn

NameTypeNotes
subject string default ""
message * string

ReplyIn

NameTypeNotes
message * string