LiyaSupport
API Reference

Authentication

Authenticate your API requests using API keys and understand rate limits and error codes.

6 min read Updated July 2026
The LiyaSupport REST API base URL is https://api.liyasupport.com/v1. All requests must be made over HTTPS. HTTP requests will receive a 301 redirect.

API keys

LiyaSupport uses API keys to authenticate requests. Your API keys carry significant privileges — keep them secure and never expose them in client-side code, version control, or public repositories.

Creating an API key

  1. Go to Settings → Integrations → API keys.
  2. Click Create API key.
  3. Give it a descriptive name (e.g. "Production backend" or "Zapier integration").
  4. Select the permissions scope (see below).
  5. Copy the key immediately — it's shown only once.
API keys are shown in full only at creation time. If you lose a key, revoke it and create a new one. There is no way to retrieve a key value after it has been created.

Key types and scopes

Key prefixEnvironmentScope options
lsk_live_…Productionread, write, or read+write per resource
lsk_test_…Test/sandboxSame as live but operates on test data only

Available permission scopes:

ScopeResourcesHTTP methods
tickets:readTickets, conversationsGET
tickets:writeTickets, conversationsPOST, PATCH, DELETE
contacts:readContactsGET
contacts:writeContactsPOST, PATCH, DELETE
knowledge:readKnowledge base articlesGET
knowledge:writeKnowledge base articlesPOST, PATCH, DELETE
webhooks:manageWebhook endpointsPOST, PATCH, DELETE
workspace:readWorkspace info, team membersGET

Making authenticated requests

Pass your API key in the Authorization header as a Bearer token:

bash
curl https://api.liyasupport.com/v1/tickets \
  -H "Authorization: Bearer lsk_live_a1b2c3d4e5f6g7h8i9j0" \
  -H "Content-Type: application/json"

Node.js (official SDK)

javascript
const Liya = require("@liyasupport/node");
// npm install @liyasupport/node

const client = new Liya({
  apiKey: process.env.LIYA_API_KEY,
});

const tickets = await client.tickets.list({ status: "open" });

Python (official SDK)

python
import liyasupport
# pip install liyasupport

client = liyasupport.Client(api_key=os.environ["LIYA_API_KEY"])

tickets = client.tickets.list(status="open")
Store API keys in environment variables (e.g. LIYA_API_KEY) and use a secrets manager in production. Never hardcode keys in your application source.

Rate limits

All API requests are subject to rate limits to ensure fair usage. Rate limits are applied per API key, not per IP address.

PlanRequests per minuteRequests per dayBurst allowance
Starter6010,000120 requests in 10 seconds
Growth300100,000600 requests in 10 seconds
Enterprise1,000Unlimited2,000 requests in 10 seconds

Rate limit headers are included in every response:

text
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1720000260

When you exceed the rate limit, you receive a 429 Too Many Requests response:

json
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1720000300
Retry-After: 12

{
  "error": {
    "type": "rate_limit_error",
    "message": "Rate limit exceeded. Retry after 12 seconds.",
    "code": "rate_limit_exceeded"
  }
}

Implement exponential backoff when receiving 429 responses. Use the Retry-After header value as your minimum delay.


Error codes

HTTP statusError typeDescription
400invalid_requestMissing or malformed request parameters
401authentication_errorInvalid or missing API key
403permission_errorAPI key doesn't have the required scope
404not_foundResource not found
409conflictRequest conflicts with existing state
422validation_errorRequest body failed validation
429rate_limit_errorRate limit exceeded
500api_errorInternal server error — retry with backoff
503service_unavailableTemporary outage — check status.liyasupport.com

All errors return a consistent JSON body:

json
{
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key. Check your key and try again.",
    "code": "invalid_api_key",
    "request_id": "req_01J9XABC123"
  }
}

Pagination

List endpoints return paginated results. Use the limit and cursorquery parameters to page through results:

bash
# First page
curl "https://api.liyasupport.com/v1/tickets?limit=50" \
  -H "Authorization: Bearer lsk_live_..."

# Next page (use cursor from response)
curl "https://api.liyasupport.com/v1/tickets?limit=50&cursor=cur_01J9XYZ..." \
  -H "Authorization: Bearer lsk_live_..."

List responses include a pagination object:

json
{
  "data": [...],
  "pagination": {
    "total": 1847,
    "limit": 50,
    "cursor": "cur_01J9XYZ456",
    "has_more": true
  }
}