API Getting Started
The Lazyspond API allows you to programmatically manage your account, automations, and leads. This guide will get you started.
Who Should Use the API?
The API is for developers who want to:
- Retrieve leads programmatically
- Manage automations via code
- Integrate Lazyspond with custom systems
- Build custom dashboards or reports
- Automate account management
If you just want to send leads to another system, use Webhooks instead.
API Availability
The API is available on:
| Plan | Available? |
|---|---|
| Free | ❌ No |
| Starter | ❌ No |
| Pro | ✅ Yes |
| Premium | ✅ Yes |
Pro and Premium plans include full API access.
Getting Your API Key
Step 1: Go to Settings
- Log into your Lazyspond dashboard
- Click Settings in the left sidebar
- Click Developers
Step 2: Generate API Key
- Click "Generate API Key"
- Copy the key (you won't be able to see it again)
- Store it somewhere safe (use a password manager)
Step 3: Use Your API Key
Include your API key in the Authorization header of all API requests:
curl -X GET "https://api.lazyspond.com/v1/leads" \
-H "Authorization: Bearer YOUR_API_KEY"
API Base URL
All API requests should be made to:
https://api.lazyspond.com/v1
Authentication
All API requests require authentication using your API key:
Authorization: Bearer YOUR_API_KEY
Example:
curl -X GET "https://api.lazyspond.com/v1/leads" \
-H "Authorization: Bearer sk_live_abc123def456"
Response Format
All API responses are in JSON format:
{
"success": true,
"data": {
"id": "ld_123456789",
"username": "sarah_fitness",
"display_name": "Sarah Johnson"
}
}
Error Handling
If an error occurs, the API returns an error response:
{
"success": false,
"error": "Invalid API key"
}
Common Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad Request — Invalid parameters |
| 401 | Unauthorized — Invalid API key |
| 403 | Forbidden — You don't have permission |
| 404 | Not Found — Resource doesn't exist |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Server Error — Something went wrong |
Rate Limiting
The API has rate limits to prevent abuse:
| Plan | Requests/Minute | Requests/Day |
|---|---|---|
| Pro | 60 | 10,000 |
| Premium | 120 | 50,000 |
If you exceed the rate limit, you'll receive a 429 error.
API Endpoints
The Lazyspond API provides the following endpoints:
Leads
- GET /leads — Retrieve all leads
- GET /leads/{id} — Retrieve a specific lead
- POST /leads — Create a lead (for testing)
Automations
- GET /automations — Retrieve all automations
- GET /automations/{id} — Retrieve a specific automation
- POST /automations — Create an automation
- PUT /automations/{id} — Update an automation
- DELETE /automations/{id} — Delete an automation
Account
- GET /account — Retrieve account information
- GET /account/usage — Retrieve usage statistics
Making Your First Request
Retrieve All Leads
curl -X GET "https://api.lazyspond.com/v1/leads" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"success": true,
"data": [
{
"id": "ld_123456789",
"username": "sarah_fitness",
"display_name": "Sarah Johnson",
"trigger_keyword": "GUIDE",
"captured_at": "2024-03-22T14:30:00Z"
},
{
"id": "ld_987654321",
"username": "john_coach",
"display_name": "John Smith",
"trigger_keyword": "PROMO",
"captured_at": "2024-03-22T15:45:00Z"
}
]
}
Next Steps
- Retrieve leads: See Leads API
- Manage automations: See Automations API
- Get account info: See Account API