Skip to main content
GET
/
api
/
v1
/
leads
curl "https://lupitor.acrely.ai/api/v1/leads?campaignId=k978z8ndfnqjnbxmphvf0wd59h6yrd0a" \
  -H "x-api-key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "leads": [
      {
        "_id": "jh7abc123xyz",
        "campaignId": "k978z8ndfnqjnbxmphvf0wd59h6yrd0a",
        "phoneNumber": "+15555551234",
        "externalId": "CRM_12345",
        "metadata": {
          "name": "John Doe",
          "company": "Acme Corp"
        },
        "status": "raw",
        "scheduledFor": "2024-12-25T09:00:00Z",
        "priority": 10,
        "attempts": 0,
        "_creationTime": 1703520000000
      },
      {
        "_id": "jh7abc456def",
        "campaignId": "k978z8ndfnqjnbxmphvf0wd59h6yrd0a",
        "phoneNumber": "+15555555678",
        "externalId": "CRM_67890",
        "metadata": {
          "name": "Jane Smith",
          "company": "Tech Inc"
        },
        "status": "raw",
        "priority": 5,
        "attempts": 0,
        "_creationTime": 1703520100000
      }
    ],
    "count": 2
  },
  "error": null
}

Authentication

x-api-key
string
required
Your API key with read or write scope

Query Parameters

campaignId
string
required
The ID of the campaign to list leads for
status
string
Filter leads by statusOptions:
  • raw - Never been called
  • attempting - Currently being called
  • exhausted - Max attempts reached
  • concluded - Successfully completed

Response

success
boolean
Whether the request was successful
data
object
error
string | null
Error message if request failed
curl "https://lupitor.acrely.ai/api/v1/leads?campaignId=k978z8ndfnqjnbxmphvf0wd59h6yrd0a" \
  -H "x-api-key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "leads": [
      {
        "_id": "jh7abc123xyz",
        "campaignId": "k978z8ndfnqjnbxmphvf0wd59h6yrd0a",
        "phoneNumber": "+15555551234",
        "externalId": "CRM_12345",
        "metadata": {
          "name": "John Doe",
          "company": "Acme Corp"
        },
        "status": "raw",
        "scheduledFor": "2024-12-25T09:00:00Z",
        "priority": 10,
        "attempts": 0,
        "_creationTime": 1703520000000
      },
      {
        "_id": "jh7abc456def",
        "campaignId": "k978z8ndfnqjnbxmphvf0wd59h6yrd0a",
        "phoneNumber": "+15555555678",
        "externalId": "CRM_67890",
        "metadata": {
          "name": "Jane Smith",
          "company": "Tech Inc"
        },
        "status": "raw",
        "priority": 5,
        "attempts": 0,
        "_creationTime": 1703520100000
      }
    ],
    "count": 2
  },
  "error": null
}

Lead Status Lifecycle

Status Meanings:
  • raw: Lead has never been called
  • attempting: Lead is currently in the calling queue
  • exhausted: Max call attempts reached without success
  • concluded: Call completed successfully

Common Errors

ErrorCauseSolution
campaignId query parameter is requiredMissing campaignIdAdd campaignId to query string
Invalid or inactive API keyWrong API keyCheck your API key
Campaign not found or access deniedWrong campaign or no accessVerify campaignId and API key scope

Usage Tips

Filtering: Use the status parameter to focus on specific subsets:
  • status=raw - See leads that haven’t been called yet
  • status=attempting - Monitor active calls
  • status=concluded - Review completed calls
Results are returned in creation order (oldest first). Pagination coming soon!