Sonar API

Programmatic access to your sales pipeline - leads and agent runs. REST over HTTPS, JSON in / JSON out, scoped API keys.

Base URL

code
https://sonar-cyan-seven.vercel.app/api/v1

Quickstart

Generate an API key in Settings / API keys, then:

bash
curl -H "Authorization: Bearer sk_..." \
  https://sonar-cyan-seven.vercel.app/api/v1/leads

Conventions

Responses

Successful responses return { "data": ... }. Errors return { "error": "..." } with an appropriate HTTP status (400 invalid input, 401 missing/invalid auth, 402 plan limit reached, 403 wrong scope, 404 not found).

Idempotency

POST endpoints create new resources every call - there's no idempotency-key header yet. Re-running the same payload will create duplicate rows.

Rate limiting

The Free-plan monthly agent-run cap is enforced - POST /api/v1/runs returns 402 once it is hit. General per-request throttling is not yet enforced and is tracked as deferred work (see .env.example). The API may add RateLimit-Remaining and Retry-After headers in a later release - until then, treat the API as best-effort and back off on 5xx.