{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"recomention API","version":"1","description":"Is a product recommended by AI engines? Public rankings need no key. Reports need an API key from your recomention account, sent as `Authorization: Bearer rmk_…`.\n\n**Limits.** 60 requests per key per minute and 10 report starts per key per hour; requests without a valid key are limited per client address. Over a limit you get 429 with `Retry-After` and `RateLimit-*` headers. A 503 carries `Retry-After` (usually 5 s). On reads it changes nothing; on `POST /v1/reports` it is ambiguous, so retry with the same `Idempotency-Key`.\n\n**Errors** are always JSON `{ \"error\": \"…\" }`, sometimes with `fields`, `limit` or `retryAfterSeconds`. Every response carries an `X-Request-Id` to quote to support.","contact":{"email":"support@recomention.com"}},"externalDocs":{"url":"https://www.recomention.com/developers"},"servers":[{"url":"https://api.recomention.com"}],"tags":[{"name":"Rankings"},{"name":"Reports"},{"name":"Projects"},{"name":"Meta"}],"paths":{"/v1/projects":{"get":{"operationId":"listProjects","summary":"List your projects","description":"The owner's projects, with latest report and active Track flag.","tags":["Projects"],"responses":{"200":{"description":"The projects.","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"brand":{"type":"string"},"domain":{"type":"string"},"createdAt":{"type":"string"},"latestReport":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["slug","status","createdAt"],"additionalProperties":false},{"type":"null"}]},"trackActive":{"type":"boolean"}},"required":["id","name","brand","domain","createdAt","latestReport","trackActive"],"additionalProperties":false}}},"required":["projects"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/prompts":{"get":{"operationId":"listPrompts","summary":"List saved questions","description":"Saved next-run questions, with stable project-specific IDs. These are not historical report Prompt rows. Intent, stage and legacy creation dates are null where not recorded. Existing series or credit reruns may repeat earlier questions, as the dashboard explains.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Saved questions.","content":{"application/json":{"schema":{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"intent":{"type":["string","null"]},"stage":{"type":["string","null"]},"createdAt":{"description":"Null when the creation date was not recorded.","type":["string","null"]}},"required":["id","text","intent","stage","createdAt"],"additionalProperties":false}}},"required":["prompts"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]},"post":{"operationId":"addPrompts","summary":"Add saved questions","description":"Idempotency receipts can be replayed for 7 days; after that window the same key may be processed as a new edit. Edits saved next-run questions only; no run starts and nothing is charged. Send a required Idempotency-Key header (16–128 letters, digits, - or _). Keys are bound to the owner, project and edit fields; repeating those returns the original result with reused=true, even after intervening edits. Changed fields describe a new edit, as with report starts. Additions use the dashboard's validation, duplicate rejection and plan cap (up to 10). Historical report questions are never modified.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPromptsRequest"}}}},"responses":{"200":{"description":"The saved list after this edit.","content":{"application/json":{"schema":{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"intent":{"type":["string","null"]},"stage":{"type":["string","null"]},"createdAt":{"description":"Null when the creation date was not recorded.","type":["string","null"]}},"required":["id","text","intent","stage","createdAt"],"additionalProperties":false}},"ok":{"type":"boolean","const":true},"reused":{"type":"boolean"}},"required":["prompts","ok","reused"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/prompts/{promptId}":{"delete":{"operationId":"removePrompt","summary":"Remove a saved question","description":"Idempotency receipts can be replayed for 7 days; after that window the same key may be processed as a new edit. Edits saved next-run questions only; no run starts and nothing is charged. Send a required Idempotency-Key header (16–128 letters, digits, - or _). Keys are bound to the owner, project and edit fields; repeating those returns the original result with reused=true, even after intervening edits. Changed fields describe a new edit, as with report starts. Additions use the dashboard's validation, duplicate rejection and plan cap (up to 10). Historical report questions are never modified.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"promptId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"}}],"responses":{"200":{"description":"The saved list after this edit.","content":{"application/json":{"schema":{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"intent":{"type":["string","null"]},"stage":{"type":["string","null"]},"createdAt":{"description":"Null when the creation date was not recorded.","type":["string","null"]}},"required":["id","text","intent","stage","createdAt"],"additionalProperties":false}},"ok":{"type":"boolean","const":true},"reused":{"type":"boolean"}},"required":["prompts","ok","reused"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/track":{"get":{"operationId":"getTrack","summary":"Read Track status","description":"Active Track series and up to 100 recent Track runs, newest first. Read runsMentioned of runsTotal usable answers per engine. Missing measurements are null and say not measured. Skipped engines are listed separately, never as zero. simulated=true marks test data.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Track schedule and measurements.","content":{"application/json":{"schema":{"type":"object","properties":{"track":{"type":"object","properties":{"active":{"type":"boolean"},"cadence":{"type":["string","null"]},"status":{"type":["string","null"]},"paused":{"type":"boolean"},"billingBlocked":{"type":"boolean"},"nextRunAt":{"type":["string","null"]},"lastRunAt":{"type":["string","null"]},"lastReportSlug":{"type":["string","null"]},"runs":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]},"simulated":{"type":"boolean"},"overallScore":{"type":["number","null"]},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"runsMentioned":{"type":["number","null"]},"runsTotal":{"type":["number","null"]},"mentionRate":{"type":["number","null"]},"measurement":{"type":"string","enum":["measured","not measured"]}},"required":["engine","runsMentioned","runsTotal","mentionRate","measurement"],"additionalProperties":false}},"enginesSkipped":{"type":"array","items":{"type":"object","properties":{"engine":{"type":"string"},"reason":{"type":"string"}},"required":["engine","reason"],"additionalProperties":false}}},"required":["slug","status","createdAt","completedAt","simulated","overallScore","engines","enginesSkipped"],"additionalProperties":false}}},"required":["active","cadence","status","paused","billingBlocked","nextRunAt","lastRunAt","lastReportSlug","runs"],"additionalProperties":false}},"required":["track"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/visits":{"get":{"operationId":"getVisits","summary":"Read AI-referral visits","description":"Visits from AI engines to the project's site, per engine per day, for the last 7, 30 or 90 days (`?days=`, default 30). Days before the first counted visit are null, not zero. Reads only what is already stored; calls no provider and spends nothing.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90],"default":30}}],"responses":{"200":{"description":"Visits per engine per day.","content":{"application/json":{"schema":{"type":"object","properties":{"visits":{"type":"object","properties":{"days":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","enum":["SNIPPET_NOT_SET_UP","NO_VISITS_YET","COUNTING"],"description":"SNIPPET_NOT_SET_UP: no site key, nothing is counted. NO_VISITS_YET: a key exists but no visit was ever counted (the snippet may not be on the site). COUNTING: visits are counted."},"measuredFrom":{"description":"The first day any visit was counted. Days before it are null, not zero.","type":["string","null"]},"engines":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta"]},"label":{"type":"string"}},"required":["source","label"],"additionalProperties":false}},"series":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"total":{"type":["number","null"]},"bySource":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta"]},"additionalProperties":{"type":"number"},"required":["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta"]},{"type":"null"}]}},"required":["day","total","bySource"],"additionalProperties":false},"description":"Every day in the range, oldest first. Null on days before counting began."},"totals":{"anyOf":[{"type":"object","properties":{"total":{"type":"number"},"bySource":{"type":"object","propertyNames":{"type":"string","enum":["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta"]},"additionalProperties":{"type":"number"},"required":["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta"]}},"required":["total","bySource"],"additionalProperties":false},{"type":"null"}]},"topPaths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"count":{"type":"number"}},"required":["path","count"],"additionalProperties":false}}},"required":["days","from","to","status","measuredFrom","engines","series","totals","topPaths"],"additionalProperties":false}},"required":["visits"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/backlinks":{"get":{"operationId":"getBacklinks","summary":"Read stored backlinks","description":"The latest saved backlink sample per domain (the project's and its competitors'). Values are null where the source did not report them; each count says its basis. Refreshing spends and stays a dashboard action. Reads only what is already stored; calls no provider and spends nothing.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stored backlink summary.","content":{"application/json":{"schema":{"type":"object","properties":{"backlinks":{"type":"object","properties":{"domain":{"type":"string"},"truncated":{"type":"boolean"},"targets":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"role":{"type":"string","enum":["PROJECT","COMPETITOR"]},"snapshots":{"type":"number"},"latest":{"anyOf":[{"type":"object","properties":{"observedAt":{"type":"string"},"source":{"type":"string"},"paid":{"type":"boolean"},"complete":{"type":"boolean"},"stale":{"type":"boolean"},"sampleSize":{"type":"number"},"totalReported":{"type":["number","null"]},"backlinks":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"basis":{"type":"string","enum":["REPORTED_TOTAL","COMPLETE_LISTING","SAMPLE"]}},"required":["value","basis"],"additionalProperties":false},{"type":"null"}]},"referringDomains":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"basis":{"type":"string","enum":["REPORTED_TOTAL","COMPLETE_LISTING","SAMPLE"]}},"required":["value","basis"],"additionalProperties":false},{"type":"null"}]},"follow":{"anyOf":[{"type":"object","properties":{"follow":{"type":"number"},"nofollow":{"type":"number"},"unknown":{"type":"number"}},"required":["follow","nofollow","unknown"],"additionalProperties":false},{"type":"null"}]},"reportedLost":{"type":["number","null"]},"authority":{"description":"The source's own rank, on its own scale; null when not reported.","type":["number","null"]}},"required":["observedAt","source","paid","complete","stale","sampleSize","totalReported","backlinks","referringDomains","follow","reportedLost","authority"],"additionalProperties":false},{"type":"null"}]}},"required":["domain","role","snapshots","latest"],"additionalProperties":false}}},"required":["domain","truncated","targets"],"additionalProperties":false}},"required":["backlinks"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/keywords":{"get":{"operationId":"listKeywords","summary":"List stored keyword research","description":"Stored keyword ideas, ranked keywords and AI questions, with volume, difficulty and rank as reported (null when not). simulated=true marks example rows shown while research is not live. New research spends and stays a dashboard action. Reads only what is already stored; calls no provider and spends nothing. 409 with code feature_disabled when the feature is switched off on this server (never empty data).","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stored keyword research.","content":{"application/json":{"schema":{"type":"object","properties":{"keywords":{"type":"object","properties":{"mode":{"type":"string"},"status":{"type":"string"},"notice":{"type":["string","null"]},"domain":{"type":"string"},"observedAt":{"type":["string","null"]},"truncated":{"type":"boolean"},"keywords":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"term":{"type":"string"},"kind":{"type":"string","enum":["KEYWORD","AI_PROMPT"]},"volume":{"type":["number","null"]},"difficulty":{"type":["number","null"]},"intent":{"type":["string","null"]},"currentRank":{"type":["number","null"]},"targetDomain":{"type":["string","null"]},"targetRole":{"type":["string","null"]},"rankedUrl":{"type":["string","null"]},"mentions":{"type":["number","null"]},"usableRuns":{"type":["number","null"]},"reportDate":{"type":["string","null"]},"simulated":{"type":"boolean"}},"required":["id","term","kind","volume","difficulty","intent","currentRank","targetDomain","targetRole","rankedUrl","mentions","usableRuns","reportDate","simulated"],"additionalProperties":false}}},"required":["mode","status","notice","domain","observedAt","truncated","keywords"],"additionalProperties":false}},"required":["keywords"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/fixes":{"get":{"operationId":"listFixes","summary":"List the latest fix list","description":"The fix list of the project's newest finished report, in order. Each fix says whether the owner ticked it done on the dashboard Fix list (saved on their account). report is null before the first finished report. Reads only what is already stored; calls no provider and spends nothing.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The fix list.","content":{"application/json":{"schema":{"type":"object","properties":{"fixes":{"type":"object","properties":{"report":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string"},"completedAt":{"type":["string","null"]},"simulated":{"type":"boolean"}},"required":["slug","completedAt","simulated"],"additionalProperties":false},{"type":"null"}]},"fixes":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"why":{"type":"string"},"how":{"type":"string"},"effort":{"type":"string","enum":["low","medium","high"]},"done":{"type":"boolean","description":"Ticked by the owner on the dashboard Fix list (saved on their account)."}},"required":["number","title","why","how","effort","done"],"additionalProperties":false}}},"required":["report","fixes"],"additionalProperties":false}},"required":["fixes"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/revenue":{"get":{"operationId":"getRevenue","summary":"Read revenue by source","description":"The Revenue by source page's numbers for the last 7, 30 or 90 days (`?days=`, default 30): conversions your site reported through the snippet, by source group (AI assistants, posts, short links and any later group), and Link Studio conversions your server verified, kept apart. Revenue is per currency, as sent, never converted. A rate appears only when its visits or clicks were measured. status says why there are no conversions. Reads only what is already stored; calls no provider and spends nothing.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90],"default":30}}],"responses":{"200":{"description":"Revenue by source.","content":{"application/json":{"schema":{"type":"object","properties":{"revenue":{"type":"object","properties":{"days":{"anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"since":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["NO_SNIPPET","NOT_REPORTING","NONE_IN_RANGE","REPORTED"],"description":"Why there are no conversions, when there are none."},"reported":{"type":"object","properties":{"total":{"type":"object","properties":{"conversions":{"type":"number"},"revenue":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","description":"The exact amount in the currency's major unit, as a decimal string."},"formatted":{"type":"string"}},"required":["currency","amount","formatted"],"additionalProperties":false},"description":"Per currency, as sent, never converted or added across currencies."},"withoutValue":{"type":"number"}},"required":["conversions","revenue","withoutValue"],"additionalProperties":false},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"denominator":{"type":"string","enum":["visits","clicks"]},"truncated":{"type":"boolean"},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"detail":{"type":["string","null"]},"denominator":{"description":"Visits or clicks behind the row; null when not measured, never 0.","type":["number","null"]},"conversions":{"type":"number"},"conversionRate":{"description":"Only when the denominator was measured and above 0.","type":["number","null"]},"revenue":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","description":"The exact amount in the currency's major unit, as a decimal string."},"formatted":{"type":"string"}},"required":["currency","amount","formatted"],"additionalProperties":false}},"withoutValue":{"type":"number"}},"required":["key","label","detail","denominator","conversions","conversionRate","revenue","withoutValue"],"additionalProperties":false}}},"required":["key","label","denominator","truncated","rows"],"additionalProperties":false},"description":"Every source group the Revenue page shows, in its order. Values are as your site sent them, not verified."},"direct":{"type":"object","properties":{"conversions":{"type":"number"},"revenue":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","description":"The exact amount in the currency's major unit, as a decimal string."},"formatted":{"type":"string"}},"required":["currency","amount","formatted"],"additionalProperties":false},"description":"Per currency, as sent, never converted or added across currencies."},"withoutValue":{"type":"number"}},"required":["conversions","revenue","withoutValue"],"additionalProperties":false}},"required":["total","groups","direct"],"additionalProperties":false},"verified":{"anyOf":[{"type":"object","properties":{"total":{"type":"object","properties":{"conversions":{"type":"number"},"revenue":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","description":"The exact amount in the currency's major unit, as a decimal string."},"formatted":{"type":"string"}},"required":["currency","amount","formatted"],"additionalProperties":false},"description":"Per currency, as sent, never converted or added across currencies."},"withoutValue":{"type":"number"}},"required":["conversions","revenue","withoutValue"],"additionalProperties":false},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"detail":{"type":["string","null"]},"denominator":{"description":"Visits or clicks behind the row; null when not measured, never 0.","type":["number","null"]},"conversions":{"type":"number"},"conversionRate":{"description":"Only when the denominator was measured and above 0.","type":["number","null"]},"revenue":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","description":"The exact amount in the currency's major unit, as a decimal string."},"formatted":{"type":"string"}},"required":["currency","amount","formatted"],"additionalProperties":false}},"withoutValue":{"type":"number"}},"required":["key","label","detail","denominator","conversions","conversionRate","revenue","withoutValue"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["total","rows","truncated"],"additionalProperties":false},{"type":"null"}],"description":"Link Studio conversions your server sent. Never added to reported. Null without a program."}},"required":["days","since","domain","status","reported","verified"],"additionalProperties":false}},"required":["revenue"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/ads":{"get":{"operationId":"getAds","summary":"Read ads reporting","description":"Your connected Google Ads and Meta Ads accounts and their cached campaign reporting (dates, fetchedAt, completeness), as the dashboard last fetched it. Never calls Google or Meta. Per provider: not connected, reconnect needed, no cached report yet, or the report. Spend is in the account currency. Reads only what is already stored; calls no provider and spends nothing. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1/projects/{id}/ads` with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ads reporting.","content":{"application/json":{"schema":{"type":"object","properties":{"ads":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["GOOGLE_ADS","META_ADS"]},"state":{"type":"string","enum":["NOT_CONNECTED","RECONNECT_NEEDED","NO_CACHED_REPORT","REPORT"]},"account":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"timeZone":{"type":"string"}},"required":["id","name","currency","timeZone"],"additionalProperties":false},{"type":"null"}]},"connectedAt":{"type":["string","null"]},"report":{"anyOf":[{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"fetchedAt":{"type":"string"},"completeness":{"type":"string","enum":["COMPLETE","PARTIAL"]},"truncated":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}},"currency":{"type":"string"},"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"]},"impressions":{"type":["string","null"]},"clicks":{"type":["string","null"]},"spend":{"description":"In the account currency's major unit, exact decimal string; null when not reported.","type":["string","null"]},"conversions":{"type":["number","null"]}},"required":["id","name","status","impressions","clicks","spend","conversions"],"additionalProperties":false}},"total":{"type":"object","properties":{"impressions":{"type":["string","null"]},"clicks":{"type":["string","null"]},"spend":{"description":"In the account currency's major unit, exact decimal string; null when not reported.","type":["string","null"]},"conversions":{"type":["number","null"]}},"required":["impressions","clicks","spend","conversions"],"additionalProperties":false}},"required":["startDate","endDate","fetchedAt","completeness","truncated","notes","currency","campaigns","total"],"additionalProperties":false},{"type":"null"}]}},"required":["provider","state","account","connectedAt","report"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}},"required":["ads"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/ads/campaigns":{"get":{"operationId":"listCampaigns","summary":"List ad campaigns","description":"The project's Google and Meta campaigns with state and revision, the month budgets, the Google connection, the approved drafts a campaign may use and whether this owner can launch now. Changes nothing. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1` + this path with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaigns and budgets.","content":{"application/json":{"schema":{"type":"object","properties":{"ads":{"type":"object","properties":{"googleLaunchAvailable":{"type":"boolean"},"connection":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"timeZone":{"type":"string"}},"required":["connectionId","accountId","name","currency","timeZone"],"additionalProperties":false},{"type":"null"}]},"drafts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"title":{"type":"string"},"body":{"type":"string"}},"required":["id","version","title","body"],"additionalProperties":false}},"monthlyBudgets":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"limit":{"type":"string","description":"USD."},"committed":{"type":"string","description":"USD committed by campaigns this UTC month; not invoice spend."},"enabled":{"type":"boolean"}},"required":["month","limit","committed","enabled"],"additionalProperties":false}},"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"revision":{"type":"number"},"month":{"type":"string"},"lifetimeCap":{"type":"string","description":"USD."},"startAt":{"type":"string"},"endAt":{"type":"string"},"scheduleTimeZone":{"type":["string","null"]},"draftId":{"type":"string"},"draftVersion":{"type":"number"},"accountId":{"type":"string"},"confirmed":{"type":"boolean"},"receipt":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Provider resource names."},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","provider","state","revision","month","lifetimeCap","startAt","endAt","scheduleTimeZone","draftId","draftVersion","accountId","confirmed","receipt","errorCode","createdAt"],"additionalProperties":false}}},"required":["googleLaunchAvailable","connection","drafts","monthlyBudgets","campaigns"],"additionalProperties":false}},"required":["ads"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]},"post":{"operationId":"createCampaign","summary":"Create a paused Google Search campaign","description":"Creates the drafted campaign PAUSED in the owner's own Google Ads account. Needs confirm: true, the draft's unchanged form and approvalHash, and an Idempotency-Key: a retry with the same key returns the same campaign (reused: true), however much later; the same key with a different campaign is a 409. Commits the full lifetime cap to the month's budget; it comes back only if Google definitively rejects the create. Nothing serves until a separate enable. Early access — owner-only until Google verifies campaign management. Google Search only. Needs an API key whose owner allowed it to run ad campaigns (Account → Developers; otherwise 403 KEY_NOT_ALLOWED). The server's ad switches, campaign and monthly caps, the owner's enabled monthly budget and, until Google verifies the app, the owner allowlist all apply; a refusal says which. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1` + this path with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}}},"responses":{"201":{"description":"The paused campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"revision":{"type":"number"},"month":{"type":"string"},"lifetimeCap":{"type":"string","description":"USD."},"startAt":{"type":"string"},"endAt":{"type":"string"},"scheduleTimeZone":{"type":["string","null"]},"draftId":{"type":"string"},"draftVersion":{"type":"number"},"accountId":{"type":"string"},"confirmed":{"type":"boolean"},"receipt":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Provider resource names."},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","provider","state","revision","month","lifetimeCap","startAt","endAt","scheduleTimeZone","draftId","draftVersion","accountId","confirmed","receipt","errorCode","createdAt"],"additionalProperties":false},"reused":{"type":"boolean"}},"required":["campaign","reused"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this account or report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/ads/campaigns/draft":{"post":{"operationId":"draftCampaign","summary":"Draft a Google Search campaign","description":"Validates a campaign exactly as the web Campaigns page does (copy only from an approved draft, the project's own HTTPS domain with no utm_* parameters (recomention adds its own tag), whole days in the account's time zone, at least 4 days, one UTC month) and asks Google to validate it without creating anything. Returns the approval hash to create with. Spends nothing and holds no budget. Early access — owner-only until Google verifies campaign management. Google Search only. Needs an API key whose owner allowed it to run ad campaigns (Account → Developers; otherwise 403 KEY_NOT_ALLOWED). The server's ad switches, campaign and monthly caps, the owner's enabled monthly budget and, until Google verifies the app, the owner allowlist all apply; a refusal says which. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1` + this path with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftCampaignRequest"}}}},"responses":{"200":{"description":"The reviewed campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"type":"object","properties":{"approvalHash":{"type":"string"},"form":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1,"maxLength":200},"draftId":{"type":"string","minLength":1,"maxLength":200},"draftVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":100},"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":180}},"finalUrl":{"type":"string","maxLength":2000,"format":"uri"},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":160},"matchType":{"type":"string","enum":["EXACT","PHRASE"]}},"required":["text","matchType"],"additionalProperties":false}},"geoTargetIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,11}$"}},"firstDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lifetimeCap":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"maxCpc":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"nonPolitical":{"type":"boolean","const":true}},"required":["connectionId","draftId","draftVersion","name","headlines","descriptions","finalUrl","keywords","geoTargetIds","firstDay","lastDay","lifetimeCap","maxCpc","nonPolitical"],"additionalProperties":false,"description":"The reviewed form: send it unchanged, with approvalHash, to create."},"schedule":{"type":"object","properties":{"startAt":{"type":"string"},"endAt":{"type":"string"},"timeZone":{"type":"string"}},"required":["startAt","endAt","timeZone"],"additionalProperties":false,"description":"The days as Google runs them, as UTC instants."},"account":{"type":"object","properties":{"accountId":{"type":"string"},"currency":{"type":"string"},"timeZone":{"type":"string"}},"required":["accountId","currency","timeZone"],"additionalProperties":false},"monthlyBudget":{"type":"object","properties":{"month":{"type":"string"},"limit":{"type":"string","description":"USD."},"committed":{"type":"string","description":"USD committed by campaigns this UTC month; not invoice spend."},"enabled":{"type":"boolean"}},"required":["month","limit","committed","enabled"],"additionalProperties":false},"initialStatus":{"type":"string","const":"PAUSED"},"reservationDisclosure":{"type":"string"},"providerValidation":{"type":"object","properties":{"state":{"type":"string"},"note":{"type":["string","null"]}},"required":["state","note"],"additionalProperties":false}},"required":["approvalHash","form","schedule","account","monthlyBudget","initialStatus","reservationDisclosure","providerValidation"],"additionalProperties":false}},"required":["draft"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this account or report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/ads/campaigns/{campaignId}/enable":{"post":{"operationId":"enableCampaign","summary":"Enable a campaign (can spend)","description":"Re-verifies the paused campaign in Google Ads and enables it, so it can serve and spend from its start time up to its cap. Needs confirmSpend: true, a second confirmation separate from create; without it nothing is changed. Only campaigns created through this API (a campaign created on the dashboard answers 409: enable it there). Already enabled answers reused: true. Early access — owner-only until Google verifies campaign management. Google Search only. Needs an API key whose owner allowed it to run ad campaigns (Account → Developers; otherwise 403 KEY_NOT_ALLOWED). The server's ad switches, campaign and monthly caps, the owner's enabled monthly budget and, until Google verifies the app, the owner allowlist all apply; a refusal says which. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1` + this path with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableCampaignRequest"}}}},"responses":{"200":{"description":"The enabled campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"revision":{"type":"number"},"month":{"type":"string"},"lifetimeCap":{"type":"string","description":"USD."},"startAt":{"type":"string"},"endAt":{"type":"string"},"scheduleTimeZone":{"type":["string","null"]},"draftId":{"type":"string"},"draftVersion":{"type":"number"},"accountId":{"type":"string"},"confirmed":{"type":"boolean"},"receipt":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Provider resource names."},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","provider","state","revision","month","lifetimeCap","startAt","endAt","scheduleTimeZone","draftId","draftVersion","accountId","confirmed","receipt","errorCode","createdAt"],"additionalProperties":false},"reused":{"type":"boolean"}},"required":["campaign","reused"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this account or report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/ads/campaigns/{campaignId}/pause":{"post":{"operationId":"pauseCampaign","summary":"Pause a campaign","description":"Pauses a campaign in its ad account (Google, or an existing Meta campaign). Always allowed, even when launching is switched off; no confirmation and no key permission needed. No cap is released. Served by the web app, which holds the ad connections: call `https://www.recomention.com/api/v1` + this path with the same key (the npm MCP server and the CLI do). Here it answers 409 with code feature_disabled and that path.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The paused campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"state":{"type":"string"},"revision":{"type":"number"},"month":{"type":"string"},"lifetimeCap":{"type":"string","description":"USD."},"startAt":{"type":"string"},"endAt":{"type":"string"},"scheduleTimeZone":{"type":["string","null"]},"draftId":{"type":"string"},"draftVersion":{"type":"number"},"accountId":{"type":"string"},"confirmed":{"type":"boolean"},"receipt":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Provider resource names."},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","provider","state","revision","month","lifetimeCap","startAt","endAt","scheduleTimeZone","draftId","draftVersion","accountId","confirmed","receipt","errorCode","createdAt"],"additionalProperties":false},"reused":{"type":"boolean"}},"required":["campaign","reused"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/links":{"get":{"operationId":"listLinks","summary":"List tracked links","description":"Your own Link Studio links (not program links), 25 per page (`?page=`), with clicks and verified conversions in the last 7, 30 or 90 days (`?days=`, default 30). Metrics cover every link, not only the page. Reads only what is already stored; calls no provider and spends nothing. 409 with code feature_disabled when the feature is switched off on this server (never empty data).","tags":["Projects"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90],"default":30}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":400,"default":1}}],"responses":{"200":{"description":"Tracked links and counts.","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"page":{"type":"number"},"total":{"type":"number"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"destination":{"type":"string"},"campaign":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"archived":{"type":"boolean"},"expiresAt":{"type":["string","null"]},"clicks":{"type":"number"},"conversions":{"type":"number"}},"required":["id","title","url","destination","campaign","tags","archived","expiresAt","clicks","conversions"],"additionalProperties":false}},"metrics":{"type":"object","properties":{"clicks":{"type":"number"},"conversions":{"type":"number"},"convertedClicks":{"type":"number"},"clickConversionRate":{"description":"Null with no clicks.","type":["number","null"]}},"required":["clicks","conversions","convertedClicks","clickConversionRate"],"additionalProperties":false}},"required":["from","to","page","total","links","metrics"],"additionalProperties":false}},"required":["links"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/connections":{"get":{"operationId":"listConnections","summary":"List connected accounts","description":"The project's connected social and channel accounts: platform, handle, account kind, status and when each was connected. Never a token or provider metadata. Also lists each platform and whether a connect link can be made for it on this server. Spends nothing.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Connected accounts and platforms.","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string","enum":["x","linkedin","instagram","tiktok","bluesky","threads","youtube","facebook","pinterest","google-business"]},"label":{"type":"string"},"handle":{"type":"string"},"accountKind":{"type":"string"},"status":{"type":"string","enum":["CONNECTED","RECONNECT_NEEDED"]},"connectedAt":{"type":"string"},"simulated":{"type":"boolean","description":"A simulated (preview or test) connection; it never publishes for real."}},"required":["id","platform","label","handle","accountKind","status","connectedAt","simulated"],"additionalProperties":false}},"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","instagram","tiktok","bluesky","threads","youtube","facebook","pinterest","google-business"]},"label":{"type":"string"}},"required":["platform","label"],"additionalProperties":false},"description":"Every platform a connect link can be asked for."},"availability":{"type":"string","const":"checked when the link is opened","description":"Whether a platform is switched on is checked by the web app when the owner opens a connect link; this list makes no claim about it."}},"required":["connections","platforms","availability"],"additionalProperties":false}},"required":["connections"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/projects/{id}/connections/links":{"post":{"operationId":"createConnectionLink","summary":"Create a connect link","description":"A single-use link, valid for 10 minutes, that opens the dashboard's connect flow for one platform of this project. Give it to the account owner to open in their browser: it opens only for that owner's signed-in session, never signs anyone in, and only preselects the project and platform; the owner still approves the platform's own consent. Whether the platform is switched on is checked when the link is opened: if it isn't, the page says why instead of continuing. At most 5 unused links at a time and 10 per hour.","tags":["Projects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionLinkRequest"}}}},"responses":{"201":{"description":"The link.","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"},"platform":{"type":"string","enum":["x","linkedin","instagram","tiktok","bluesky","threads","youtube","facebook","pinterest","google-business"]},"singleUse":{"type":"boolean","const":true}},"required":["url","expiresAt","platform","singleUse"],"additionalProperties":false}},"required":["link"],"additionalProperties":false}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/rankings":{"get":{"operationId":"listRankings","summary":"List the public AI rankings","description":"Each category's latest month: who the engines name, with counts. No key needed.","tags":["Rankings"],"responses":{"200":{"description":"The rankings.","content":{"application/json":{"schema":{"type":"object","properties":{"rankings":{"type":"array","items":{"$ref":"#/components/schemas/RankingSummary"}}},"required":["rankings"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/v1/rankings/{slug}":{"get":{"operationId":"getRanking","summary":"Get one ranking","description":"One category's latest ranking with every answer verbatim. No key needed.","tags":["Rankings"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The ranking.","content":{"application/json":{"schema":{"type":"object","properties":{"ranking":{"$ref":"#/components/schemas/Ranking"}},"required":["ranking"],"additionalProperties":false}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/v1/reports":{"get":{"operationId":"listReports","summary":"List your reports","description":"The key owner's reports, newest first (up to 100).","tags":["Reports"],"responses":{"200":{"description":"The reports.","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/ReportListItem"}}},"required":["reports"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]},"post":{"operationId":"startReport","summary":"Start a report","description":"Spends an agency credit, or runs on your own provider keys where enabled. Starts are limited to 10 per key per hour on top of the per-minute limit, and, on your own keys, to the Agent plan's limits.\n\n**Idempotency.** Send an `Idempotency-Key` header (or body `idempotencyKey`, 16–128 of `A–Z a–z 0–9 - _`). Keys are scoped to the account that owns the API key, not to the key itself or globally, and bound to the report it describes: `domain`, `brand`, `description`, `category`, `plan`, `engines` and `seedPrompts` (the same key with any of those changed is a different start). **`providerKeys` are not part of that fingerprint**: a retry with the same key and corrected provider keys returns the original start, even a failed one, so rerun with a new `Idempotency-Key`. A retry with the same key and the same report fields returns the original start (200, `reused: true`) and spends nothing again. If that original start was funded by a credit that has since been returned (it could not be queued, or it started, failed and got its credit back), the retry gets 409; start again with a new key. Without a key every request is a new start.\n\n**A 503 from this operation is ambiguous.** The start may still complete after the response (for example when it times out on our side). Retry with the **same** `Idempotency-Key` and body: you get the original start if it went through, or a new one if it did not, never both.","tags":["Reports"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes a start safe to retry. Scoped to the account that owns the API key and to the report fields (not `providerKeys`); a retry must repeat them. Same rules as body `idempotencyKey`; if both are sent they must match.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartReportRequest"}}}},"responses":{"200":{"description":"An earlier start with the same idempotency key (`reused: true`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedReport"}}}},"202":{"description":"Started. Poll `statusUrl`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedReport"}}}},"400":{"description":"The request is invalid. `fields` names what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"No agency credit left, or (own keys) no active Agent plan (`limit: \"plan\"`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this account or report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The idempotency key belongs to a credit start whose credit was refunded, whether it could not be queued or it ran and failed (start again with a new key), or another conflict named in `error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 32 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per key, per address, or 10 starts per key per hour), or an Agent plan limit named in `limit`. `perDay` (starts in any 24 hours), `reportsPerMonth` and `projects` (per billing period) carry `Retry-After` and `retryAfterSeconds` when the wait is known. `concurrent` carries neither: it frees when a running report finishes, so poll its status and retry then.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Ambiguous: the start may or may not have happened. Retry after `Retry-After` seconds with the same `Idempotency-Key` and body; it never spends twice.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/reports/{slug}":{"get":{"operationId":"getReport","summary":"Get a report","description":"The full report as JSON: scores, competitors, sources, the fix list and every answer. Only the owner's key can read it.","tags":["Reports"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The report.","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"$ref":"#/components/schemas/Report"}},"required":["report"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/reports/{slug}/status":{"get":{"operationId":"getReportStatus","summary":"Get a report's status","description":"Where a report is, with answers stored so far. Poll about once a minute.","tags":["Reports"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The status.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ReportStatus"}},"required":["status"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/reports/{slug}/kit":{"get":{"operationId":"getDistributionKit","summary":"Get a report's Distribution Kit","description":"Markdown files for your own agent, built from a finished paid report.","tags":["Reports"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The kit.","content":{"application/json":{"schema":{"type":"object","properties":{"kit":{"$ref":"#/components/schemas/DistributionKit"}},"required":["kit"],"additionalProperties":false}}}},"401":{"description":"Missing, malformed, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this account or report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Someone else's report answers the same as a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a state that allows this yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Wait `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window (0 on a 429).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds to wait at most: the window's full length.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something failed on our side. Retry later; on a start, retry with the same `Idempotency-Key` and body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A dependency is briefly unavailable. Retry after `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]}]}},"/v1/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","description":"The OpenAPI 3.1 description of API v1.","tags":["Meta"],"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, in plain words. Never repeats a submitted secret."},"fields":{"description":"Request fields to fix (400).","type":"array","items":{"type":"string"}},"retryAfterSeconds":{"description":"Seconds to wait before retrying (429).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"description":"Which plan limit refused a start: plan, projects, reportsPerMonth, perDay, concurrent.","type":"string"},"status":{"description":"The report's status, when it explains the refusal (409).","type":"string"}},"required":["error"],"additionalProperties":false},"RankingSummary":{"type":"object","properties":{"slug":{"type":"string"},"category":{"type":"string"},"month":{"type":"string","description":"YYYY-MM"},"prompts":{"type":"array","items":{"type":"string"}},"checkedAt":{"type":"string","format":"date-time"},"engines":{"type":"array","items":{"$ref":"#/components/schemas/Engine"}},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"mentions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","mentions"],"additionalProperties":false}},"answers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["slug","category","month","prompts","checkedAt","engines","top","answers","url"],"additionalProperties":false},"Engine":{"type":"string","enum":["OPENAI","ANTHROPIC","PERPLEXITY","GEMINI","GROK","AI_OVERVIEW"],"description":"An answer engine."},"Ranking":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"slug":{"type":"string"},"category":{"type":"string"},"month":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"engines":{"type":"array","items":{"$ref":"#/components/schemas/Engine"}},"runsPerPrompt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prompts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":{}}},"brands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"mentions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avgPosition":{"type":"number"}},"required":["name","mentions","avgPosition"],"additionalProperties":{}}},"answers":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engine":{"$ref":"#/components/schemas/Engine"},"run":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"}},"required":["prompt","engine","run","text"],"additionalProperties":{}}},"url":{"type":"string"}},"required":["version","slug","category","month","checkedAt","engines","runsPerPrompt","prompts","brands","answers","url"],"additionalProperties":{}},"ReportListItem":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","description":"The report page."},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETE","FAILED"]},"simulated":{"type":"boolean","description":"A test run with made-up answers. Draw no conclusions from it."},"plan":{"type":"string"},"funding":{"anyOf":[{"type":"string","const":"BYOK"},{"type":"null"}]},"overallScore":{"description":"0–100 once COMPLETE, else null.","type":["number","null"]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"brand":{"type":"string"},"domain":{"type":"string"},"category":{"type":"string"}},"required":["slug","url","status","simulated","plan","funding","overallScore","createdAt","completedAt","brand","domain","category"],"additionalProperties":false},"StartedReport":{"type":"object","properties":{"slug":{"type":"string"},"status":{"type":"string"},"reused":{"type":"boolean","description":"true when an earlier start with the same idempotency key is returned (200)."},"funding":{"type":"string","enum":["credits","byok"]},"url":{"type":"string"},"statusUrl":{"type":"string","description":"Poll this about once a minute."}},"required":["slug","status","reused","funding","url","statusUrl"],"additionalProperties":false},"Report":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","description":"The report page."},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETE","FAILED"]},"simulated":{"type":"boolean","description":"A test run with made-up answers. Draw no conclusions from it."},"plan":{"type":"string"},"funding":{"anyOf":[{"type":"string","const":"BYOK"},{"type":"null"}]},"overallScore":{"description":"0–100 once COMPLETE, else null.","type":["number","null"]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"brand":{"type":"string"},"domain":{"type":"string"},"category":{"type":"string"},"progress":{"anyOf":[{"type":"object","properties":{"answersStored":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answersPlanned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["answersStored","answersPlanned"],"additionalProperties":false},{"type":"null"}]},"error":{"type":["string","null"]},"description":{"type":"string"},"preparedBy":{"type":["string","null"]},"paid":{"type":"boolean"},"summary":{"type":["string","null"]},"engines":{"type":"array","items":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/Engine"},"label":{"type":"string"},"mentionRate":{"type":"number"},"runsMentioned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"runsTotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"runsNoAnswer":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promptsMentioned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promptsTotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avgRank":{"type":["number","null"]},"badgeEarned":{"type":"boolean"}},"required":["engine","label","mentionRate","runsMentioned","runsTotal","runsNoAnswer","promptsMentioned","promptsTotal","avgRank","badgeEarned"],"additionalProperties":false}},"enginesSkipped":{"type":"array","items":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/Engine"},"label":{"type":"string"},"reason":{"type":"string"}},"required":["engine","label","reason"],"additionalProperties":false},"description":"Engines that did not run, and why. Never scored as zero."},"competitors":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"domain":{"type":"string"},"shareOfVoice":{"type":"number"},"mentions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avgRank":{"type":["number","null"]}},"required":["brand","shareOfVoice","mentions","avgRank"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"citations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engines":{"type":"array","items":{"$ref":"#/components/schemas/Engine"}},"exampleUrl":{"description":"A page on this domain the engines cited, or null when they reached it only through a redirect link.","type":["string","null"]},"own":{"type":"boolean"}},"required":["domain","citations","engines","exampleUrl"],"additionalProperties":false}},"actionPlan":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"why":{"type":"string"},"how":{"type":"string"},"effort":{"type":"string","enum":["low","medium","high"]}},"required":["title","why","how","effort"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"},"intent":{"type":"string"},"stage":{"type":"string"},"searches":{"description":"What the engines searched for this question, per engine. Null when no answer recorded its searches.","anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/Engine"},"label":{"type":"string"},"exposed":{"type":"boolean","const":false}},"required":["engine","label","exposed"],"additionalProperties":false},{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/Engine"},"label":{"type":"string"},"exposed":{"type":"boolean","const":true},"answers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Answers from this engine whose complete list of searches was recorded: the denominator of every query's answers count."},"incompleteAnswers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Answers whose recorded list is incomplete (see searchQueriesIncomplete). Their searches are listed but they are in no denominator."},"incomplete":{"description":"Why those lists are incomplete; present when incompleteAnswers is above 0.","type":"array","items":{"type":"string","enum":["unreported","truncated"]}},"queries":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"answers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the complete answers ran this search."},"incompleteAnswers":{"description":"How many of the incomplete answers reported this search; absent when none did.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["query","answers"],"additionalProperties":false}}},"required":["engine","label","exposed","answers","incompleteAnswers","queries"],"additionalProperties":false}]}},{"type":"null"}]},"answers":{"type":"array","items":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/Engine"},"run":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"boolean","description":"The call failed. A failed call is in no count — never a run that did not mention the product."},"failure":{"type":["string","null"]},"noAnswer":{"description":"The engine gave nothing to score (e.g. no AI Overview). Not a miss.","type":["string","null"]},"mentioned":{"type":["boolean","null"]},"rank":{"type":["number","null"]},"brands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"}},"required":["name"],"additionalProperties":false}},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"domain":{"type":"string"},"title":{"type":"string"}},"required":["url","domain"],"additionalProperties":false}},"answer":{"type":["string","null"]},"searchQueries":{"description":"The web searches the engine ran for this answer, in order. \"not exposed\": the engine's API does not say what it searched. Null: not recorded (a failed call, an answer whose engine searched without saying what for, or a report from before searches were stored) — never read as \"searched nothing\". At most 100 per answer (20,000 characters in all; see searchQueriesIncomplete); each search is stored with its runs of whitespace collapsed to one space, and one over 500 characters once case and spacing are ignored is kept shortened, ending in \"… #\" and an 8-character code of the whole search (case and spacing ignored), which is its identity when searches are counted.","anyOf":[{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","const":"not exposed"}]},{"type":"null"}]},"searchQueriesIncomplete":{"description":"Present when searchQueries is not every search this answer ran: \"unreported\", the engine ran a search without saying what it was; \"truncated\", it ran more than are kept. A search missing from such a list may still have been run.","type":"array","items":{"type":"string","enum":["unreported","truncated"]}}},"required":["engine","run","failed","failure","noAnswer","mentioned","rank","brands","citations","answer"],"additionalProperties":false}}},"required":["order","text","intent","answers"],"additionalProperties":false}}},"required":["slug","url","status","simulated","plan","funding","overallScore","createdAt","completedAt","brand","domain","category","progress","error","description","preparedBy","paid","summary","engines","enginesSkipped","competitors","sources","actionPlan","questions"],"additionalProperties":false},"ReportStatus":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","description":"The report page."},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETE","FAILED"]},"simulated":{"type":"boolean","description":"A test run with made-up answers. Draw no conclusions from it."},"plan":{"type":"string"},"funding":{"anyOf":[{"type":"string","const":"BYOK"},{"type":"null"}]},"overallScore":{"description":"0–100 once COMPLETE, else null.","type":["number","null"]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"brand":{"type":"string"},"domain":{"type":"string"},"category":{"type":"string"},"progress":{"anyOf":[{"type":"object","properties":{"answersStored":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answersPlanned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["answersStored","answersPlanned"],"additionalProperties":false},{"type":"null"}]},"error":{"type":["string","null"]}},"required":["slug","url","status","simulated","plan","funding","overallScore","createdAt","completedAt","brand","domain","category","progress","error"],"additionalProperties":false},"DistributionKit":{"type":"object","properties":{"slug":{"type":"string"},"brand":{"type":"string"},"domain":{"type":"string"},"simulated":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"],"additionalProperties":false}}},"required":["slug","brand","domain","simulated","files"],"additionalProperties":false},"StartReportRequest":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"The product's domain, e.g. example.com."},"description":{"type":"string","minLength":3,"maxLength":300,"description":"One line on what the product does."},"category":{"type":"string","minLength":2,"maxLength":120,"description":"The category buyers would search, e.g. \"meeting scheduling\"."},"brand":{"description":"The product's name. Derived from the domain when omitted.","type":"string","maxLength":80},"plan":{"default":"FULL","description":"Which plan's question count and engines to run. An agency credit runs FULL.","type":"string","enum":["QUICK","FULL","DEEP"]},"seedPrompts":{"description":"Buyer questions to ask. They must not name the product.","maxItems":40,"type":"array","items":{"type":"string","minLength":8,"maxLength":200}},"engines":{"description":"A subset of the plan's engines. Defaults to all of them.","minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["OPENAI","ANTHROPIC","PERPLEXITY","GEMINI","GROK","AI_OVERVIEW"]}},"funding":{"type":"string","enum":["credits","byok"],"description":"\"credits\" spends one agency credit; \"byok\" runs on your own provider keys where enabled."},"providerKeys":{"description":"funding \"byok\" only. Used for this run and never stored in the clear or echoed back.","type":"object","properties":{"OPENAI":{"type":"string","maxLength":400},"ANTHROPIC":{"type":"string","maxLength":400},"PERPLEXITY":{"type":"string","maxLength":400},"GEMINI":{"type":"string","maxLength":400},"GROK":{"type":"string","maxLength":400},"AI_OVERVIEW":{"type":"string","maxLength":400}},"additionalProperties":false},"idempotencyKey":{"description":"Same as the Idempotency-Key header. A retry with the same key returns the first start.","type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$"}},"required":["domain","description","category","funding"],"additionalProperties":false},"AddPromptsRequest":{"type":"object","properties":{"text":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":400}}},"required":["text"],"additionalProperties":false},"CreateConnectionLinkRequest":{"type":"object","properties":{"platform":{"type":"string","enum":["x","linkedin","instagram","tiktok","bluesky","threads","youtube","facebook","pinterest","google-business"]}},"required":["platform"],"additionalProperties":false},"DraftCampaignRequest":{"type":"object","properties":{"form":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1,"maxLength":200},"draftId":{"type":"string","minLength":1,"maxLength":200},"draftVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":100},"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":180}},"finalUrl":{"type":"string","maxLength":2000,"format":"uri"},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":160},"matchType":{"type":"string","enum":["EXACT","PHRASE"]}},"required":["text","matchType"],"additionalProperties":false}},"geoTargetIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,11}$"}},"firstDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lifetimeCap":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"maxCpc":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"nonPolitical":{"type":"boolean","const":true}},"required":["connectionId","draftId","draftVersion","name","headlines","descriptions","finalUrl","keywords","geoTargetIds","firstDay","lastDay","lifetimeCap","maxCpc","nonPolitical"],"additionalProperties":false}},"required":["form"],"additionalProperties":false},"CreateCampaignRequest":{"type":"object","properties":{"form":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1,"maxLength":200},"draftId":{"type":"string","minLength":1,"maxLength":200},"draftVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":100},"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":180}},"finalUrl":{"type":"string","maxLength":2000,"format":"uri"},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":160},"matchType":{"type":"string","enum":["EXACT","PHRASE"]}},"required":["text","matchType"],"additionalProperties":false}},"geoTargetIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,11}$"}},"firstDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lifetimeCap":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"maxCpc":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,2})?$"},"nonPolitical":{"type":"boolean","const":true}},"required":["connectionId","draftId","draftVersion","name","headlines","descriptions","finalUrl","keywords","geoTargetIds","firstDay","lastDay","lifetimeCap","maxCpc","nonPolitical"],"additionalProperties":false},"approvalHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirm":{"type":"boolean","const":true}},"required":["form","approvalHash","confirm"],"additionalProperties":false},"EnableCampaignRequest":{"type":"object","properties":{"confirmSpend":{"type":"boolean","const":true}},"required":["confirmSpend"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key (`rmk_…`)."}}}}