Skip to main content

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.

get

/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
Request parameters
NameLocationTypeRequirementDescription
pagequeryintegerOptional—
per_pagequeryintegerOptional—
statusquerystringOptional—
cityquerystringOptional—
min_scorequerynumberOptional—
max_scorequerynumberOptional—
searchquerystringOptionalSubstring match on `company_name`.
sortquerystringOptional—
orderquerystringOptional—

Responses

  • 200 Paginated list of leads.
  • 400 Response
  • 401 Response
  • 403 Response
  • 429 Response
  • 500 Response
get

/leads/{id}Get a lead by ID

Category
Leads
Required scope
leads:read
Request parameters
NameLocationTypeRequirementDescription
idpathstring (uuid)Required—

Responses

  • 200 The lead record.
  • 400 Response
  • 401 Response
  • 403 Response
  • 404 Response
  • 429 Response
get

/agentsList agents

Returns the 18 known agents and the status of their most recent run.

Category
Agents
Required scope
agents:read

Responses

  • 200 All agents with last-run summary.
  • 401 Response
  • 403 Response
  • 429 Response
post

/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

  • 201 Job enqueued.
  • 400 Response
  • 401 Response
  • 403 Response
  • 429 Response
  • 500 Response
get

/agents/{name}Get agent details and recent run history

Category
Agents
Required scope
agents:read
Request parameters
NameLocationTypeRequirementDescription
namepathstringRequiredAgent identifier (underscored form).

Responses

  • 200 Agent record with the last 20 runs.
  • 400 Response
  • 401 Response
  • 403 Response
  • 429 Response
  • 500 Response
get

/openapiOpenAPI 3.1 schema

Returns this document. No authentication required.

Category
Meta
Required scope
Public endpoint

Responses

  • 200 OpenAPI 3.1 schema as JSON.
  • 429 Response