Getting Leads
Endpoint Overview
Fetch leads belonging to your organization. Supports optional query parameters for list-based filtering and pagination.
- HTTP Method:
GET - Endpoint URL:
https://api.trywhiteowl.com/api/v1/leads - Authentication: Bearer Token (API Key)
- Required Permission:
leads:read(Ensure your API key has Read permission under Leads)
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
list |
Number | No | Filter leads belonging to a specific lead list ID. |
page |
Number | No | Page number for paginated results. |
limit |
Number | No | Number of records to return per page. |
Request Headers
Section titled “Request Headers”| Header | Type | Required | Description |
|---|---|---|---|
Authorization |
String | Yes | Bearer token format: Bearer YOUR_API_KEY |
Content-Type |
String | Yes | application/json |
Code Examples
Section titled “Code Examples”cURL
curl -X GET "https://api.trywhiteowl.com/api/v1/leads?list=3" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"JavaScript (Fetch)
const listId = 3;const options = { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }};
fetch(`https://api.trywhiteowl.com/api/v1/leads?list=${listId}`, options) .then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error(err));Python (Requests)
import requests
url = "https://api.trywhiteowl.com/api/v1/leads"params = {"list": 3}headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
response = requests.get(url, headers=headers, params=params)print(response.json())Response Structure
Section titled “Response Structure”Success Response (200 OK)
{ "success": true, "message": "Leads fetched successfully", "data": [ { "id": 501, "name": "Jane Doe", "email": "jane.doe@example.com", "status": "new", "note": "Interested in enterprise pricing", "source": "website", "lists": [3, 12], "organization": "org_12345" } ]}Error Responses
- Missing Permissions (
403 Forbidden):
{ "success": false, "message": "Your API key does not have the 'leads:read' permission"}- Internal / Database Error:
{ "success": false, "message": "There was an error getting the courses"}