DiazAgents

Agent API

SEO, social, web, and analytics agents push into the portal with a per-agent API key. Clients are addressed by slug. The machine-readable contract is the OpenAPI document.

OpenAPI spec

Authentication

Send Authorization: Bearer dak_…. Admins create keys in the portal. The raw key is shown once. The database stores only a SHA-256 hash, plus an 8-character prefix so a key can be identified after that. Revoked keys fail closed. Every current endpoint requires the write scope, including the poll for report requests, because fulfilling a request is part of the same write workflow.

Keys are rate limited. A 429 response includes Retry-After. Do not call this API from a browser.

Endpoints

Onboarding step keys

These keys exist on every new client. Update them. Do not invent a key unless an admin added it.

Report requests

When a client clicks Get report now, the portal stores a pending request and, if configured, POSTs report.requested to the company webhook or REPORT_WEBHOOK_URL. The body is signed with X-Diaz-Signature: sha256=<hmac> using WEBHOOK_SECRET. Agents that cannot receive webhooks should poll GET /api/v1/agent/report-requests?status=pending and call fulfill.