Lists
Preview Lead List
How many leads a segment's filters match and the newest five, before saving it (RO-341: the preview of a filter typed in plain words, `POST /ai/lead-filter`). Nothing is saved.
API key access
Needs the
leads:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role.POST
/api/v1/lists/previewAuthorizationBearer <token>
Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Header Parameters
X-Workspace-Id?string | null
Id of the workspace to act on (must be a member).
filtersSegmentFilters
A segment's lead filters (those of GET /leads).
Response Body
curl -X POST "http://localhost:8000/api/v1/lists/preview" \ -H "X-Workspace-Id: string" \ -H "Content-Type: application/json" \ -d '{ "filters": {} }'{
"filters": {
"status": [
"string"
],
"owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",
"company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
"q": "string",
"title": "string",
"industry": "string",
"country": "st",
"replied": true
},
"total": 0,
"items": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"first_name": "string",
"last_name": "string",
"email": "string",
"title": "string",
"status": "string",
"company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
"company_name": "string",
"added_at": "2019-08-24T14:15:22Z"
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}