REST API v1

API Documentation

Retrieve leads, calls, and analytics from your AgentIzzy account. All endpoints use Bearer token authentication and return JSON.

Requires Pro or Enterprise plan. Generate an API key in your portal under Settings > Integrations.

Base URL

https://portal.agentizzy.com/api/v1

Authentication

All requests require a Bearer token in the Authorization header. API keys start with aiz_.

Authorization: Bearer aiz_your_api_key_here

Generating a key: Log into portal.agentizzy.com, go to Settings > Integrations, and click Generate API Key. Copy the key immediately — it will not be shown again.

Security: Keys are hashed before storage. You can revoke a key at any time from the Integrations page. All requests are served over HTTPS.

Error Responses

Status Meaning
401Invalid or missing API key, or account not on Pro/Enterprise plan
500Server error
// Error response body
{ "error": "Invalid or missing API key. Pro or Enterprise plan required." }

GET

/v1/leads

Retrieve all leads captured by your AI phone agent. Returns leads sorted by most recent first.

Query Parameters

Parameter Type Description
statusstring (optional)Filter by status: new, contacted, follow_up, converted, lost

Example Request

curl https://portal.agentizzy.com/api/v1/leads \
  -H "Authorization: Bearer aiz_your_key"

Response

{
  "facilityId": "fac-12345",
  "statusCounts": {
    "new": 5,
    "contacted": 2,
    "follow_up": 1,
    "converted": 3,
    "lost": 0
  },
  "total": 11,
  "leads": [
    {
      "id": "lead-001",
      "firstName": "Sarah",
      "lastName": "Johnson",
      "phone": "+14155551234",
      "email": "sarah@example.com",
      "callerPhone": "+14155551234",
      "moveIn": "2026-05-01",
      "unitSize": null,
      "status": "new",
      "capturedAt": "2026-04-04T10:30:00Z"
    }
  ]
}

Response Fields

Field Type Description
idstringUnique lead identifier
firstNamestring?Lead's first name (if captured)
lastNamestring?Lead's last name (if captured)
phonestring?Lead's contact phone number
emailstring?Lead's email address
callerPhonestringPhone number the lead called from
moveInstring?Requested move-in or service date (ISO 8601)
unitSizestring?Requested unit size (storage) or service type
statusstringLead status: new, contacted, follow_up, converted, lost
capturedAtstringWhen the lead was captured (ISO 8601)

GET

/v1/calls

Retrieve call history with AI summaries and sentiment analysis. Returns calls sorted by most recent first.

Query Parameters

Parameter Type Description
limitinteger (optional)Number of calls to return. Default: 50, max: 100

Example Request

curl https://portal.agentizzy.com/api/v1/calls?limit=10 \
  -H "Authorization: Bearer aiz_your_key"

Response

{
  "facilityId": "fac-12345",
  "stats": {
    "totalCalls": 42,
    "leadsCaptures": 8,
    "avgDuration": 180
  },
  "calls": [
    {
      "id": "call-001",
      "callSid": "CA-abc123",
      "callerNumber": "+14155551234",
      "startedAt": "2026-04-04T10:28:00Z",
      "endedAt": "2026-04-04T10:32:15Z",
      "durationSeconds": 255,
      "tag": "new_lead",
      "aiSummary": "Caller asked about emergency plumbing repair...",
      "sentiment": "positive"
    }
  ]
}

Response Fields

Field Type Description
idstringUnique call identifier
callSidstringTwilio Call SID
callerNumberstringPhone number of the caller
startedAtstringCall start time (ISO 8601)
endedAtstring?Call end time (ISO 8601)
durationSecondsintegerCall duration in seconds
tagstringCall classification: new_lead, general, missed, spam
aiSummarystring?AI-generated summary of the call
sentimentstring?Call sentiment: positive, neutral, negative

GET

/v1/analytics

Retrieve aggregated analytics including call volume trends, lead conversion rates, busiest hours, and performance comparisons across time periods.

Query Parameters

Parameter Type Description
daysinteger (optional)Number of days to analyze. Default: 30, max: 90

Example Request

curl https://portal.agentizzy.com/api/v1/analytics?days=7 \
  -H "Authorization: Bearer aiz_your_key"

Response

{
  "facilityId": "fac-12345",
  "period": { "days": 7 },
  "current": {
    "totalCalls": 42,
    "leadsCaptures": 8,
    "avgDuration": 180,
    "captureRate": 19
  },
  "previous": {
    "totalCalls": 38,
    "leadsCaptures": 6,
    "avgDuration": 165
  },
  "callsPerDay": [ ... ],
  "callsByTag": { "new_lead": 8, "general": 30, "spam": 4 },
  "callsByHour": [ ... ],
  "callsByDayOfWeek": [ ... ],
  "leadsByStatus": { "new": 5, "contacted": 2, "converted": 3 }
}

Response Fields

Field Type Description
period.daysintegerNumber of days in the analysis period
currentobjectStats for the current period (totalCalls, leadsCaptures, avgDuration, captureRate)
previousobjectStats for the previous equivalent period (for comparison)
callsPerDayarrayDaily call counts for the period
callsByTagobjectCall counts by tag (new_lead, general, missed, spam)
callsByHourarrayCall distribution by hour of day (0-23)
callsByDayOfWeekarrayCall distribution by day of week
leadsByStatusobjectLead counts by status

Rate Limits

API requests are rate-limited to prevent abuse. Current limits are generous for typical use cases. If you encounter rate limiting, reduce your request frequency or contact support.

Zapier Integration

Don't want to build against the API directly? Use our Zapier integration to connect AgentIzzy to 9,000+ apps with no code. Available triggers:

  • New Lead — triggers when a lead is captured from a call
  • New Call — triggers when a call is completed

Ready to get started?

Generate your API key and start building integrations in minutes.