API
API Reference
Diskovri exposes a REST API at /api/v1 so you can read enriched leads, inspect agent runs, and trigger background enrichment.
Authenticate requests with X-API-Key. Keys carry scopes such as leads:read and agents:trigger.
Raw schema: https://diskovri.com/api/v1/openapi
OpenAPI 3.1.0 · version 1.3.0
Endpoint reference
6 operations generated directly from the schema shipped by this build. All authenticated operations use the X-API-Key.
/leadsList leads
Returns a paginated list of leads, scoped to the API key's workspace. Duplicates are excluded by default (`is_canonical = true OR duplicate_of IS NULL`).
- Category
- Leads
- Required scope
- leads:read
| Name | Location | Type | Requirement | Description |
|---|---|---|---|---|
| page | query | integer | Optional | — |
| per_page | query | integer | Optional | — |
| status | query | string | Optional | — |
| city | query | string | Optional | — |
| min_score | query | number | Optional | — |
| max_score | query | number | Optional | — |
| search | query | string | Optional | Substring match on `company_name`. |
| sort | query | string | Optional | — |
| order | query | string | Optional | — |
Responses
200Paginated list of leads.400Response401Response403Response429Response500Response
/leads/{id}Get a lead by ID
- Category
- Leads
- Required scope
- leads:read
| Name | Location | Type | Requirement | Description |
|---|---|---|---|---|
| id | path | string (uuid) | Required | — |
Responses
200The lead record.400Response401Response403Response404Response429Response
/agentsList agents
Returns the 18 known agents and the status of their most recent run.
- Category
- Agents
- Required scope
- agents:read
Responses
200All agents with last-run summary.401Response403Response429Response
/agentsTrigger an agent run
Inserts a job into `job_queue`. The Python worker (or pg_notify listener) picks it up. Returns the `job_id` so callers can poll `/agents/{name}` for progress.
- Category
- Agents
- Required scope
- agents:trigger
Responses
201Job enqueued.400Response401Response403Response429Response500Response
/agents/{name}Get agent details and recent run history
- Category
- Agents
- Required scope
- agents:read
| Name | Location | Type | Requirement | Description |
|---|---|---|---|---|
| name | path | string | Required | Agent identifier (underscored form). |
Responses
200Agent record with the last 20 runs.400Response401Response403Response429Response500Response
/openapiOpenAPI 3.1 schema
Returns this document. No authentication required.
- Category
- Meta
- Required scope
- Public endpoint
Responses
200OpenAPI 3.1 schema as JSON.429Response