Dhancept · Developer

Report API

Generate institutional-grade research reports programmatically. Every request runs the same 11-stage Research Council the app uses, bills against your plan's report allowance, and returns a report you can embed in your own product or a partner's.

Authentication

Create a key in the app under Settings → API Keys (organization manager only). The raw key (dk_live_…) is shown once — store it securely. Pass it as a bearer token on every request:

Authorization: Bearer dk_live_your_key_here

A key grants full report access for its organization. Revoke a compromised key immediately from the same screen.

Create a report

POST/api/v1/reports

Start a report from free-form text, or from a report template with placeholder values. Returns immediately with 202 Accepted — the report generates asynchronously; poll for the result.

curl -X POST https://your-domain/api/v1/reports \
  -H "Authorization: Bearer dk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "query": "Initiating coverage on RELIANCE.NS" }'

# Or from a template:
#   { "templateId": 12, "placeholders": { "TICKER": "TCS", "COMPANY_NAME": "Tata Consultancy" } }

# → 202
{ "id": 123, "status": "running", "poll": "https://your-domain/api/v1/reports/123" }
FieldTypeNotes
querystringFree-form instruction. Required unless a template is given.
templateId / reportIdnumber / stringUse a saved or built-in report template instead of free text.
placeholdersobjectValues for the template's {TOKEN} fields (e.g. TICKER, COMPANY_NAME).

Poll for the result

GET/api/v1/reports/{id}
curl https://your-domain/api/v1/reports/123 \
  -H "Authorization: Bearer dk_live_…"

# while generating:
{ "id": 123, "status": "running", "report": null }

# when done:
{ "id": 123, "status": "done", "reportTitle": "…", "tickers": ["RELIANCE"],
  "report": "# Initiating Coverage …(markdown)…" }

# on failure:
{ "id": 123, "status": "error", "error": "…" }

List reports

GET/api/v1/reports

Returns the 25 most recent reports for your organization.

Allowance & billing

Each report consumes one unit of your plan's monthly report allowance, exactly like an in-app report. When the allowance is exhausted the API returns 402 Payment Required — top up report credits (₹130 each, no platform fee) in the app, then retry.

Rate limits & errors

StatusMeaning
401Missing, malformed, unknown, or revoked API key.
402Report allowance exhausted — buy report credits.
404Report not found (or belongs to another organization).
429Rate limit: max 6 report creations per minute per key.

Reports are AI-generated research and analytics, not investment advice.