cURL Examples
List Leads
bash
curl https://api.looma.chat/v1/leads \
-H "Authorization: Bearer lm_your_key"With filters:
bash
curl "https://api.looma.chat/v1/leads?status=new&site_id=12&page=1&per_page=50" \
-H "Authorization: Bearer lm_your_key"Get Lead Details
bash
curl https://api.looma.chat/v1/leads/456 \
-H "Authorization: Bearer lm_your_key"Update Lead Status
bash
curl -X PATCH https://api.looma.chat/v1/leads/456 \
-H "Authorization: Bearer lm_your_key" \
-H "Content-Type: application/json" \
-d '{"status": "in_progress", "assigned_operator_id": 5}'Add Comment to Lead
bash
curl -X POST https://api.looma.chat/v1/leads/456/comments \
-H "Authorization: Bearer lm_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "Called the customer, waiting for callback."}'Export Leads as CSV
bash
curl -o leads.csv "https://api.looma.chat/v1/leads/export?status=new&date_from=2026-01-01" \
-H "Authorization: Bearer lm_your_key"List Chats
bash
curl "https://api.looma.chat/v1/chats?status=operator&per_page=20" \
-H "Authorization: Bearer lm_your_key"Send Chat Message
bash
curl -X POST https://api.looma.chat/v1/chats/session_abc123/messages \
-H "Authorization: Bearer lm_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "Hello! How can I help you today?"}'Upload File to Chat
bash
curl -X POST https://api.looma.chat/v1/chats/session_abc123/files \
-H "Authorization: Bearer lm_your_key" \
-F "file=@/path/to/document.pdf" \
-F "message=Please see the attached document"Close Chat
bash
curl -X POST https://api.looma.chat/v1/chats/session_abc123/close \
-H "Authorization: Bearer lm_your_key"List Products
bash
curl "https://api.looma.chat/v1/products?site_id=12&availability=in+stock&per_page=100" \
-H "Authorization: Bearer lm_your_key"Get Balance
bash
curl https://api.looma.chat/v1/balance \
-H "Authorization: Bearer lm_your_key"Create Webhook
bash
curl -X POST https://api.looma.chat/v1/webhooks \
-H "Authorization: Bearer lm_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/looma",
"events": ["lead.created", "chat.message.new"]
}'List Sites
bash
curl "https://api.looma.chat/v1/sites?include_stats=1" \
-H "Authorization: Bearer lm_your_key"
