Skip to main content
GET
/
api
/
v1
/
enterprise
/
{enterpriseId}
/
leads
List leads (all brands)
curl --request GET \
  --url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 123,
      "team_id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "received_at": "2023-11-07T05:31:56Z",
      "source": {
        "id": 123,
        "name": "<string>",
        "display_name": "<string>",
        "medium": "<string>"
      },
      "external_id": "<string>",
      "customer": {
        "name": "<string>",
        "phone_number": "<string>",
        "email": "<string>",
        "address": "<string>",
        "street": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zip": "<string>",
        "country": "<string>",
        "notes": "<string>"
      },
      "attribution": {
        "utm_source": "<string>",
        "utm_medium": "<string>",
        "utm_campaign": "<string>",
        "utm_term": "<string>",
        "utm_content": "<string>"
      },
      "contacted": true,
      "not_contacted_reason": "<string>",
      "bookings": [
        {
          "st_job_id": "<string>",
          "booked_at": "2023-11-07T05:31:56Z",
          "job_type": "<string>"
        }
      ],
      "booked_job_id": "<string>",
      "completed_at": "2023-11-07T05:31:56Z",
      "raw": {}
    }
  ],
  "pagination": {
    "cursor": "<string>",
    "has_more": true,
    "limit": 123
  },
  "meta": {
    "enterprise_id": 123,
    "team_ids": [
      123
    ]
  }
}

Authorizations

Authorization
string
header
required

API key in the format avoca_<64 hex characters>

Path Parameters

enterpriseId
integer
required

The enterprise ID

Query Parameters

start_date
string<date-time>

Inclusive lower bound on created_at (>=)

end_date
string<date-time>

Exclusive upper bound on created_at (<)

medium
enum<string>

Lead-source medium

Available options:
webhook,
email_alerts,
st_bookings_alerts,
st_native,
google_lsa,
yelp,
web_chat,
dropped_responder
source
string

Lead-source canonical name (exact match)

status
enum<string>

Lead processing status

Available options:
created,
queued,
processing,
completed,
failed,
skipped
include_raw
boolean
default:true

When false, omit the raw third-party payload field (default true)

include_ignored
boolean
default:false

When true, include suppressed leads (adds is_ignored / ignored_reason)

include_test_numbers
boolean
default:false

When true, include leads from the team's registered test phone numbers (default false)

include_test_teams
boolean
default:false

Include designated internal QA/test teams in multi-team aggregations (default false)

cursor
string

Opaque pagination cursor from the previous response's pagination.cursor

limit
integer
default:50

Results per page (default 50, max 500)

Required range: x <= 500

Response

Paginated leads across all brands

data
object[]
pagination
object
meta
object