Skip to main content

Prerequisites

1

Leavo Account

Create an account at app.leavo.ai
2

API Key

Generate an API key in Settings > API Keys

Your First Request

Let’s make a simple request to list your leads:
curl -X GET "https://api.leavo.ai/backend/leads" \
  -H "Authorization: Bearer your_api_key_here"

Create Your First Lead

curl -X POST "https://api.leavo.ai/backend/leads" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "email": "[email protected]",
    "phone": "+15551234567",
    "company": "XYZ Company"
  }'

Process Message with AI

Send a message for AI processing:
curl -X POST "https://api.leavo.ai/ai/process" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "your_tenant_id",
    "lead_id": "lead_id",
    "role": "user",
    "content": "Hello, I would like to know more about the product",
    "message_type": "text",
    "debounce": true,
    "postback_url": "https://your-webhook.com/callback"
  }'

Next Steps