Getting Started
Overview
The Looma.chat API lets you programmatically access your leads, chats, products, visitors, and more. Use it to build CRM integrations, automate workflows, or connect Looma with your existing tools.
Base URL
All API requests are made to:
https://api.looma.chat/v1/Step 1: Create an API Key
- Log in to app.looma.chat
- Go to Integrations in the sidebar menu
- Click Create API Key
- Choose a name, select scopes (permissions), and optionally restrict to specific sites
- Copy the generated key — it's shown only once
Your key looks like: lm_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0
Step 2: Make Your First Request
Include the API key in the Authorization header:
bash
curl https://api.looma.chat/v1/leads \
-H "Authorization: Bearer lm_your_api_key_here"Step 3: Read the Response
Every response follows this format:
Success:
json
{
"success": true,
"data": [ ... ],
"meta": {
"total": 128,
"total_pages": 5,
"current_page": 1,
"per_page": 30
}
}Error:
json
{
"success": false,
"error": {
"code": "invalid_api_key",
"message": "Invalid or missing API key"
}
}Available Scopes
When creating an API key, you select which scopes (permissions) it has:
| Scope | Description |
|---|---|
leads:read | List and view leads |
leads:write | Update leads, add comments |
chats:read | List and view chats and messages |
chats:write | Send messages, transfer, close chats |
products:read | View product catalog |
visitors:read | List and view visitors |
visitors:write | Update visitor contact info |
sites:read | View sites and channels |
balance:read | View credit balance and usage |
webhooks:manage | Create, update, delete webhooks |
Site Scoping
API keys can be restricted to specific sites. When a key is scoped to sites [1, 3], it can only access data from those sites — leads, chats, products, and visitors from other sites will be hidden.
Next Steps
- Authentication — details on API key authentication
- Rate Limiting — request limits and headers
- Errors — error codes and troubleshooting
- Webhooks — real-time event notifications
