{"openapi":"3.1.0","info":{"title":"DiscoTrace Agentic AEO API","version":"1.0.0","description":"Workspace-scoped REST API for reading studies, AI buyer traces, reservations, content drafts, deterministic credit estimates, and queueing study runs. Authenticate with a workspace Bearer API key (dt_live_... or dt_test_...)."},"servers":[{"url":"https://app.discotrace.com/api/v1"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Workspace API key created in Portal -> API & MCP (dt_live_... or dt_test_...)."}}},"paths":{"/me":{"get":{"summary":"Inspect authenticated workspace and API key guardrails"}},"/credits":{"get":{"summary":"Get workspace credit balance and recent job credit usage"}},"/credits/estimate":{"post":{"summary":"Deterministic pre-flight credit quote for a study plan_spec"}},"/studies":{"get":{"summary":"List workspace studies and latest KPI metrics"},"post":{"summary":"Create a new study revision v1 (supports Idempotency-Key and optional queue_run)"}},"/studies/{slug}":{"get":{"summary":"Get study metadata, active revision plan_spec, and runs"}},"/studies/{slug}/runs":{"get":{"summary":"List all historical runs/passes for a study"}},"/studies/{slug}/traces":{"get":{"summary":"Query graded AI buyer answer traces from latest pass"}},"/studies/{slug}/reservations":{"get":{"summary":"List coded buyer reservations from latest pass"}},"/studies/{slug}/opportunities":{"get":{"summary":"List prioritized AEO opportunities and linked copy-ready drafts"}},"/studies/{slug}/drafts":{"get":{"summary":"List content drafts for a study"},"post":{"summary":"Create or upsert a content draft for an opportunity"}},"/studies/{slug}/drafts/{id}":{"patch":{"summary":"Update draft markdown, metadata, or review status"}},"/jobs":{"get":{"summary":"List study execution jobs in this workspace"},"post":{"summary":"Queue a study run or experiment (enforces auto_approve_credits guardrail)"}},"/jobs/{id}":{"get":{"summary":"Check status, progress, and credit billing of a job"}}}}