Skip to content
AnytimeReply

REST endpoints

Leads

Contacts the agent collected, form submissions and leads from flows — newest first.

GET/api/v1/agents/{id}/leads

Send your API key in the Authorization: Bearer af_live_… header. See Authentication.

Query parameters

sincestring
Only leads created after this ISO 8601 time, e.g. 2026-10-01T00:00:00Z. Use the newest created_at you've seen to sync incrementally.

Returns up to 1,000 leads, newest first.

Shell
curl "https://anytimereply.com/api/v1/agents/AGENT_ID/leads?since=2026-10-01T00:00:00Z" \
  -H "Authorization: Bearer af_live_YOUR_KEY"
200 OK
{
  "data": [
    {
      "id": "l9…",
      "conversation_id": "8b1d6c2e-…",
      "name": "Rahim",
      "email": "[email protected]",
      "phone": "+8801700000000",
      "notes": "Form: Call me back",
      "form": "Call me back",
      "data": { "name": "Rahim", "phone": "+8801700000000", "order_id": "A-1001" },
      "created_at": "2026-10-19T08:40:00.000Z"
    }
  ]
}

Fields

conversation_idstring | null
The chat the lead came from (null for MCP leads).
notesstring | null
What the customer wants, or the form name.
formstring | null
The form's label for form submissions; MCP for leads saved through the MCP server.
dataobject
Every submitted form field. Empty for leads the AI saved.

For real-time delivery use the lead.created webhook instead of polling.

Was this page helpful?
Still stuck? Contact us