Skip to main content

API Overview

The Leezy API provides programmatic access to your chatbot data, leads, tickets, and meetings. Use it to integrate Leezy with your existing tools and workflows.

Base URL

https://app.leezy.ai/api/v1

Requirements

Paid Plan Required

API access requires a Starter plan or higher. Free tier users cannot access the API.

Authentication

All API requests require authentication using a Bearer token in the Authorization header:

curl -X GET "https://app.leezy.ai/api/v1/leads" \
-H "Authorization: Bearer lzy_at_your_access_token"

Access tokens are obtained through OAuth 2.0 authentication.

Response Format

All responses follow a consistent JSON structure:

Success Response

{
"data": [
{
"id": "abc123",
"type": "lead",
"attributes": {
"contact": {
"name": "John Doe",
"email": "john@example.com"
},
"created_at": "2024-01-15T10:30:00Z"
}
}
],
"meta": {
"api_version": "2024-01-01",
"total": 42,
"limit": 20,
"offset": 0,
"has_more": true,
"count": 20
}
}

Error Response

{
"error": "invalid_token",
"error_description": "The access token is invalid or has expired"
}

Pagination

List endpoints support pagination with limit and offset parameters:

ParameterTypeDefaultMaxDescription
limitinteger20100Number of records to return
offsetinteger0-Number of records to skip
# Get page 2 with 50 items per page
GET /api/v1/leads?limit=50&offset=50

Filtering

Most endpoints support filtering:

# Filter leads by chatbot
GET /api/v1/leads?chatbot_id=abc123

# Filter by status
GET /api/v1/tickets?status=open

# Polling: Get records updated since timestamp
GET /api/v1/leads?since=2024-01-15T10:00:00Z

Rate Limits

PlanRate Limit
Starter100 requests/minute
Pro300 requests/minute
Business1,000 requests/minute

When rate limited, you receive a 429 Too Many Requests response:

{
"error": "rate_limit_exceeded",
"error_description": "Too many requests. Please retry after 60 seconds."
}

Error Codes

Status CodeErrorDescription
400invalid_requestRequest validation failed
401unauthorizedMissing or invalid Authorization header
401invalid_tokenAccess token expired or invalid
403insufficient_scopeToken lacks required scope
403plan_requiredPaid plan required for API access
404not_foundResource does not exist
429rate_limit_exceededToo many requests
500server_errorInternal server error

Available Endpoints

EndpointMethodsScope Required
/api/v1/chatbotsGET-
/api/v1/leadsGETleads:read
/api/v1/ticketsGETtickets:read
/api/v1/meetingsGETmeetings:read
/api/v1/webhooksGET, POST, DELETEwebhooks:manage

Next Steps