{"openapi":"3.0.0","paths":{"/health":{"get":{"operationId":"AppController_healthCheck","summary":"Health check","description":"Returns API health status for monitoring and load balancers.","parameters":[],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}}},"tags":["Health"]}},"/v1/brands/reports":{"get":{"operationId":"BrandController_list","summary":"List all brand reports","parameters":[{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"type":"string"}},{"name":"order","required":false,"in":"query","description":"Sort order","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status (e.g. done, running, error)","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on the report title","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of brand reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBrandReportsResponseDto"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"BrandController_createModularBrand","summary":"Create a new brand report","description":"Returns 200 immediately with report id and status \"running\". Generation runs in background. Poll GET /brands/reports/:id or GET /brands/reports/pending to track progress.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModularBrandDto"}}}},"responses":{"200":{"description":"Report started; id returned immediately (report may still be generating)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrandReportResponseDto"}}}},"400":{"description":"Invalid data or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Plan limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/pending":{"get":{"operationId":"BrandController_getPendingBrandReport","summary":"Get pending brand reports","parameters":[],"responses":{"200":{"description":"Pending report status (hasPending + reports array)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingBrandReportResponseDto"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal server error"}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/cancel/{id}":{"patch":{"operationId":"BrandController_cancelBrandReport","summary":"Cancel a brand report","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to cancel this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}":{"get":{"operationId":"BrandController_getOne","summary":"Get a brand report by ID (DEPRECATED monolithic payload)","description":"DEPRECATED: This endpoint returns the full monolithic brand report and can reach 15MB+ on large fixtures. It will be removed later; the removal date will be announced in advance in the Sunset header. Prefer the modular endpoints under GET /brands/reports/:id/summary, /overview, /patient-questions, /professional-questions, /competitors, /sources, /recommendations, etc. or stream with /export?format=ndjson.","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Full brand report. JSON fields (patientQuestions, sources, overview, etc.) are returned as JSON strings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandReportDetailResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - Not authorized to access this report"},"404":{"description":"Report not found"},"500":{"description":"Internal server error"}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"BrandController_deleteReport","summary":"Delete a brand report","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to delete this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/competitors-context":{"get":{"operationId":"BrandController_getCompetitorsContext","summary":"Get competitors context for a product","parameters":[{"name":"product","required":true,"in":"query","description":"Product name to analyze","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Language code (default: fr)","schema":{"type":"string"}},{"name":"indications","required":false,"in":"query","description":"Comma-separated therapeutic areas/indications (e.g. \"Atopic Dermatitis,Fertility\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Competitors context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitorsContextResponseDto"}}}},"400":{"description":"Product parameter is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Feature not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/trending-questions":{"get":{"operationId":"BrandController_getTrendingQuestions","summary":"Get trending questions for a product","parameters":[{"name":"product","required":true,"in":"query","description":"Product name to analyze","schema":{"type":"string"}},{"name":"languages","required":false,"in":"query","description":"Comma-separated list of language codes (e.g., \"fr,en\")","schema":{"type":"string"}},{"name":"excludeQuestions","required":false,"in":"query","description":"JSON: { patient?: string[], professional?: string[], payer?: string[], competitor?: string[] } to exclude and avoid duplicates","schema":{"type":"string"}},{"name":"indications","required":false,"in":"query","description":"Comma-separated indications to focus trending questions","schema":{"type":"string"}},{"name":"llm","required":false,"in":"query","description":"Override TRENDING_LLM: Perplexity or OpenAI","schema":{"type":"string"}}],"responses":{"200":{"description":"Trending questions by language","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrendingQuestionsLanguageGroupDto"}}}}},"400":{"description":"Product parameter is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"BrandController_postTrendingQuestions","summary":"Generate trending questions for a product (POST body for large exclude lists)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTrendingQuestionsBodyDto"}}}},"responses":{"200":{"description":"Trending questions by language","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrendingQuestionsLanguageGroupDto"}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/brand-limits":{"get":{"operationId":"BrandController_getBrandLimits","summary":"Get brand report limits and usage","parameters":[],"responses":{"200":{"description":"Report limits and usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUsageStatsDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring":{"post":{"operationId":"BrandController_createRecurringBrand","summary":"Create an empty RecurringReport shell (coquille) without running a report","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecurringBrandDto"}}}},"responses":{"201":{"description":"Created RecurringReport shell","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandReportShellDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"BrandController_listRecurringBrands","summary":"List all recurring brand reports (paginated, filterable by brand and indication)","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page (capped to keep response under 4MB)","schema":{"type":"string"}},{"name":"target","required":false,"in":"query","description":"Filter by brand/product name (e.g. \"Dupixent\")","schema":{"type":"string"}},{"name":"indication","required":false,"in":"query","description":"Filter by indication (e.g. \"Asthma\"). Returns RRs whose indications array contains this value.","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of recurring brand reports (slim list rows: target, lastReport, totalReports, activeReportSettings id/name/productName — not full shell llms/languages).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRecurringBrandListResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/history/{id}":{"get":{"operationId":"BrandController_getRecurringBrandHistory","summary":"Get history of a recurring brand report","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size when paginating (1-100, default 20). Ignored otherwise.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"`pagination.nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"paginate","required":false,"in":"query","description":"Opt-in pagination: `paginate=true` (or a `cursor`). Without it the response is unchanged — every run, archived ones included — whatever `limit` says. With it, `generatedReports` holds one page of runs (oldest first) and a `pagination` object { limit, hasMore, nextCursor } is added.","schema":{"type":"string"}}],"responses":{"200":{"description":"Report history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandHistoryResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to access this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/evolution/{id}":{"get":{"operationId":"BrandController_getRecurringBrandEvolution","summary":"Get evolution analysis of a recurring brand report","description":"One point per finished, non-archived run of the series (status done, legacy completed, or partial), oldest first. A run still pending or running, or one that failed, has no point: it shows up once it is finished.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date — include only generated reports with createdAt >= from.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date — include only generated reports with createdAt <= to.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous. On an evolution series the unit is a run: a run that carries no data tagged with this market is REMOVED from the series rather than reported at zero. A run that predates the opening of a market is not a collapse to zero, and drawing it as one would be a falsehood the caller cannot detect. Metrics are recomputed from the market-tagged answers, never read off the all-markets aggregate, so the numbers cannot silently include a neighbouring market. Brand `topSources` is scoped through the `marketCodes` a source carries. Runs generated before that tag existed only carry it once the markets backfill has passed, and only when the run is mono-market — a multi-market run from that era cannot say which market cited a given URL, so its ranking comes back empty under the filter rather than crediting one market's sources to the other.","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Evolution analysis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandEvolutionResponseDto"}}}},"400":{"description":"Unknown 'market' code, malformed 'marketScope' pair, or the two combined","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to access this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/status/{id}":{"patch":{"operationId":"BrandController_updateRecurringBrandStatus","summary":"Update recurring report status","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringBrandStatusDto"}}}},"responses":{"200":{"description":"Status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandReportShellDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to update this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/settings/{id}":{"patch":{"operationId":"BrandController_updateRecurringBrandSettings","summary":"Update recurring report settings","description":"Returns the updated recurring report with settings only (reportSettings, activeReportSettings). Does not include generatedReports.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringBrandSettingsDto"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandWithSettingsDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to update this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/generate-now/{id}":{"post":{"operationId":"BrandController_generateBrandNow","summary":"Generate a recurring brand report immediately","description":"Returns 200 immediately with report id and status \"running\". Generation runs in background. Poll GET /brands/reports/:id or GET /brands/reports/pending to track progress.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report started; id returned immediately (report may still be generating)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrandReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized or limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/report-settings":{"get":{"operationId":"BrandController_listReportSettings","summary":"List all report settings for account product","parameters":[],"responses":{"200":{"description":"List of report settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/settings/{recurringId}":{"get":{"operationId":"BrandController_listReportSettingsByRecurring","summary":"List report settings for a recurring report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of report settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"BrandController_createReportSettings","summary":"Create report settings for a recurring report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportSettingsDto"}}}},"responses":{"201":{"description":"Report settings created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/settings/active/{recurringId}":{"patch":{"operationId":"BrandController_setActiveReportSettings","summary":"Set active report settings for a recurring report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetActiveReportSettingsDto"}}}},"responses":{"200":{"description":"Active settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring report or settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/{id}/generated-reports":{"get":{"operationId":"BrandController_listGeneratedReportsForRecurringBrand","summary":"Paginated list of generated reports linked to a recurring brand report","description":"Returns a lightweight, cursor-paginated list of generated reports (id, title, target, status, createdAt, updatedAt). Use the modular /brands/reports/:reportId/... endpoints to fetch full content.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"limit","required":false,"in":"query","description":"Default 100, max 1000","schema":{"type":"number"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated generated reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedReportsPageDto"}}}},"404":{"description":"Recurring brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/recurring/{id}":{"get":{"operationId":"BrandController_getRecurringBrand","summary":"Get a recurring brand report by ID (slim, without full generated report content)","description":"Returns the recurring report with settings and a slim list of generated reports (id, title, target, status, timestamps only). To load a full report, use GET /brands/reports/:reportId/... modular endpoints. To paginate through generated reports, use GET /brands/recurring/:id/generated-reports.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Recurring brand report details (slim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandWithSettingsDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to access this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"BrandController_archiveRecurringBrand","summary":"Archive a recurring brand report (soft-delete)","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Recurring brand report archived successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringBrandReportShellDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/report-settings/parse-questions":{"post":{"operationId":"BrandController_parseReportQuestions","summary":"Parse and classify questions via LLM (patient / professional / payer / competitor)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseQuestionsBodyDto"}}}},"responses":{"200":{"description":"Classified questions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseQuestionsResponseDto"}}}},"400":{"description":"Invalid input or too many lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/report-settings/{id}":{"get":{"operationId":"BrandController_getReportSettings","summary":"Get report settings by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Report settings ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"put":{"operationId":"BrandController_updateReportSettings","summary":"Update report settings (productName immutable)","parameters":[{"name":"id","required":true,"in":"path","description":"Report settings ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportSettingsDto"}}}},"responses":{"200":{"description":"Report settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"BrandController_deleteReportSettings","summary":"Delete report settings (blocked if active)","parameters":[{"name":"id","required":true,"in":"path","description":"Report settings ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report settings deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Cannot delete active settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/report-settings/{id}/duplicate":{"post":{"operationId":"BrandController_duplicateReportSettings","summary":"Duplicate report settings","parameters":[{"name":"id","required":true,"in":"path","description":"Report settings ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Report settings duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSettingsItemDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/markets":{"get":{"operationId":"V2MarketsController_list","summary":"Countries a V2 question can target","description":"A V2 market is a country with its own server. This list gives the countries open to V2 questions today. /v1 routes are not affected.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2MarketsResponseDto"}}}}},"tags":["V2 · Markets"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/auth/register":{"post":{"operationId":"AuthController_register","summary":"Create a new user account","parameters":[{"name":"accept-language","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-forwarded-for","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDto"}}}},"responses":{"201":{"description":"Account created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponseDto"}}}},"400":{"description":"Invalid data, captcha verification failed, or password refused: { code: \"PASSWORD_POLICY\", issues: [...] }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Email already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Rate limit reached: { code: \"RATE_LIMITED\" } + Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Captcha verification temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/login":{"post":{"operationId":"AuthController_login","summary":"Login and get JWT token","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Sign-in locked for this address after too many consecutive failures: { code: \"ACCOUNT_LOCKED\" }; or rate limit reached: { code: \"RATE_LIMITED\" } + Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/google":{"post":{"operationId":"AuthController_googleLogin","summary":"Login or sign up with Google (Google Identity Services ID token)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLoginDto"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Invalid Google token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/confirm-email":{"post":{"operationId":"AuthController_confirmEmail","summary":"Confirm email address","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmEmailDto"}}}},"responses":{"200":{"description":"Email confirmed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmEmailResponseDto"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Token not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/resend-confirmation":{"post":{"operationId":"AuthController_resendConfirmation","summary":"Resend confirmation email","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendConfirmationDto"}}}},"responses":{"200":{"description":"Confirmation email sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendConfirmationResponseDto"}}}},"400":{"description":"Invalid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/check-email-status":{"post":{"operationId":"AuthController_checkEmailStatus","summary":"Check email confirmation status","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckEmailStatusDto"}}}},"responses":{"200":{"description":"Email confirmation status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckEmailStatusResponseDto"}}}},"400":{"description":"Invalid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/forgot-password":{"post":{"operationId":"AuthController_forgotPassword","summary":"Request password reset","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordDto"}}}},"responses":{"200":{"description":"Password reset email sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordResponseDto"}}}},"400":{"description":"Invalid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Rate limit reached: { code: \"RATE_LIMITED\" } + Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/verify-reset-token":{"post":{"operationId":"AuthController_verifyResetToken","summary":"Verify password reset token validity","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResetTokenDto"}}}},"responses":{"200":{"description":"Token is valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResetTokenResponseDto"}}}},"400":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Token not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/reset-password":{"post":{"operationId":"AuthController_resetPassword","summary":"Reset password","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"200":{"description":"Password reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponseDto"}}}},"400":{"description":"Invalid token, or password refused: { code: \"PASSWORD_POLICY\", issues: [...] }","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Token not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Rate limit reached: { code: \"RATE_LIMITED\" } + Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"]}},"/v1/auth/account":{"get":{"operationId":"AuthController_getAccountInfo","summary":"Get user account information","parameters":[],"responses":{"200":{"description":"Account information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInfoResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Authentication"],"security":[{"JWT-auth":[]}]}},"/v1/auth/api-keys":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create a new API key","description":"Returns the plaintext API key only at creation. Store it securely — PharmaGeo does not keep a recoverable copy.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyDto"}}}},"responses":{"201":{"description":"API key created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["API Keys"],"security":[{"JWT-auth":[]}]},"get":{"operationId":"ApiKeyController_getApiKeys","summary":"Get all API keys for the account","parameters":[],"responses":{"200":{"description":"List of API keys (plaintext key not included for existing keys)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyListItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["API Keys"],"security":[{"JWT-auth":[]}]},"delete":{"operationId":"ApiKeyController_deleteApiKey","summary":"Delete an API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiKeyDto"}}}},"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOperationResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to delete this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["API Keys"],"security":[{"JWT-auth":[]}]}},"/v1/auth/api-keys/revoke":{"patch":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke an API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiKeyDto"}}}},"responses":{"200":{"description":"API key revoked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOperationResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to revoke this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["API Keys"],"security":[{"JWT-auth":[]}]}},"/v1/auth/api-keys/toggle-status":{"patch":{"operationId":"ApiKeyController_toggleApiKeyStatus","summary":"Enable/disable an API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleApiKeyStatusDto"}}}},"responses":{"200":{"description":"API key status updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyToggleResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to update this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["API Keys"],"security":[{"JWT-auth":[]}]}},"/v1/llm/available":{"get":{"operationId":"LlmController_getAvailableLlms","summary":"List available LLMs","description":"Returns the list of LLM providers that are configured and available (API key set in environment).","parameters":[],"responses":{"200":{"description":"List of available LLM provider names","content":{"application/json":{"schema":{"type":"object","properties":{"llms":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok"]}}}}}}},"401":{"description":"Unauthorized"}},"tags":["LLM"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/google/overviews/sync":{"post":{"operationId":"GoogleController_syncAiOverviews","summary":"Sync AI Overviews for queries (manual sync)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAiOverviewsDto"}}}},"responses":{"200":{"description":"Sync completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAiOverviewsResponseDto"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"502":{"description":"Upstream sync failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Google AI Overviews"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/google/overviews":{"get":{"operationId":"GoogleController_getAiOverviews","summary":"Get AI Overviews","parameters":[{"name":"reportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"agnosticReportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"mergedReportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"pathology","required":false,"in":"query","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of AI Overviews matching the filters","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AiOverviewItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Google AI Overviews"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/google/overviews/youtube":{"get":{"operationId":"GoogleController_getYouTubeMetrics","summary":"Get YouTube citation metrics","parameters":[{"name":"reportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"agnosticReportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"mergedReportId","required":false,"in":"query","schema":{"type":"string"}},{"name":"pathology","required":false,"in":"query","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"YouTube channel citation metrics, sorted by total citations (descending)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeChannelMetricsDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Google AI Overviews"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/google/overviews/retry-pending":{"post":{"operationId":"GoogleController_retryPendingSnapshots","summary":"Retry pending snapshots across all accounts (background job, service-token guarded)","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryPendingSnapshotsResponseDto"}}}},"401":{"description":"Missing or invalid admin service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"502":{"description":"Upstream failure while retrying snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Google AI Overviews"],"security":[{"api-key":[]},{"JWT-auth":[]},{"admin-service-token":[]}]}},"/v1/webhooks":{"post":{"operationId":"WebhookController_create","summary":"Create a webhook subscription","description":"Each event is a POST of a JSON body (schema WebhookReportCompletedPayloadDto) to the subscription URL, with a 10 s timeout and no retry. With a secret, the X-PharmaGeo-Signature header is \"sha256=\" followed by the hex HMAC-SHA256 of the raw body with that secret: compute it on the bytes received, before parsing. Example with the secret my-secret-for-hmac — body: {\"event\":\"merged_report.completed\",\"reportId\":\"7f9c2a4e-1b2c-4d3e-9f00-1a2b3c4d5e6f\",\"reportType\":\"merged\",\"timestamp\":\"2026-11-20T10:05:30.000Z\",\"title\":\"Atopic dermatitis — Dupixent\",\"seriesId\":\"1c2d3e4f-5a6b-7c8d-9e0f-a1b2c3d4e5f6\",\"kind\":\"merged\",\"status\":\"done\"} — header: X-PharmaGeo-Signature: sha256=9e37fa6b9ab810dca0ab874b5913490eea777dcfbe4c213d042ead7b2ff11f4d. merged_report.completed is sent for every merged report, one-off or from a series, when it ends: status done or partial, or error when the run stops on an error or is stopped after 6 hours without finishing; status always has the value of GET /v2/reports/:id. The same reportId can receive more than one event (a run stopped as stuck that finishes later, a run resumed after a restart): the latest one wins, and GET /v2/reports/:id always gives the current status. Fields may be added to the body; ignore the ones you do not know.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookSubscriptionDto"}}}},"responses":{"201":{"description":"Webhook subscription created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDto"}}}},"400":{"description":"Invalid data or missing accountProductId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Webhooks"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"WebhookController_list","summary":"List webhook subscriptions","parameters":[],"responses":{"200":{"description":"List of webhook subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDto"}}}}},"400":{"description":"Missing accountProductId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Webhooks"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/webhooks/{id}":{"get":{"operationId":"WebhookController_getOne","summary":"Get a webhook subscription by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook subscription ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDto"}}}},"400":{"description":"Missing accountProductId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Webhook subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Webhooks"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"WebhookController_update","summary":"Update a webhook subscription","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook subscription ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookSubscriptionDto"}}}},"responses":{"200":{"description":"Webhook subscription updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponseDto"}}}},"400":{"description":"Invalid data or missing accountProductId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Webhook subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Webhooks"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"WebhookController_delete","summary":"Delete a webhook subscription","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook subscription ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook subscription deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Missing accountProductId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Webhook subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Webhooks"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas":{"post":{"operationId":"PersonasController_create","summary":"Create a persona (draft)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonaDto"}}}},"responses":{"201":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"PersonasController_list","summary":"List personas of the account product (cursor paginated)","parameters":[{"name":"base","required":false,"in":"query","schema":{"enum":["patient","professional","payer"],"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"enum":["draft","validated","archived"],"type":"string"}},{"name":"indication","required":false,"in":"query","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","description":"Which personas to return: the account's own, the global library archetypes, or both.","schema":{"default":"all","enum":["all","owned","library"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive match on the persona name","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Comma-separated persona ids. Resolves a known selection without paging the library.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor (persona id) for pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/suggest":{"get":{"operationId":"PersonasController_suggest","summary":"Suggest library personas for a pathology","description":"Returns up to one library archetype per base (patient / professional / payer), the most prevalent of each within the therapeutic areas matching the pathology. Empty when the pathology matches no therapeutic area — an unrelated persona would silently bias the run.","parameters":[{"name":"pathology","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/{id}":{"get":{"operationId":"PersonasController_getById","summary":"Get a persona by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"PersonasController_update","summary":"Update a persona (new version when attributes change)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonaDto"}}}},"responses":{"200":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/{id}/versions":{"get":{"operationId":"PersonasController_getVersions","summary":"List versions sharing the persona name","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/{id}/duplicate":{"post":{"operationId":"PersonasController_duplicate","summary":"Duplicate a persona as a new draft","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/{id}/validate":{"post":{"operationId":"PersonasController_validate","summary":"Mark a persona as validated","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/personas/{id}/archive":{"post":{"operationId":"PersonasController_archive","summary":"Archive a persona","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/progress":{"get":{"operationId":"BrandSectionsController_progress","summary":"Generation progress of a brand report (poll-safe)","description":"Returns one boolean per section (filled or not) plus isComplete. The predicate is evaluated in Postgres, so the report payload is never loaded — this is the ONLY route safe to poll during generation. Every other brand route, including the modular ones, loads the whole report row.","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"{ sections: Record<section, boolean>, isComplete: boolean }"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/personas":{"get":{"operationId":"BrandSectionsController_personas","summary":"Persona-contextualized answers for this brand report (WS2)","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Record<personaId, { personaName, base, patient, professional }>"},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/summary":{"get":{"operationId":"BrandSectionsController_summary","summary":"Lightweight metadata and counters for a brand report","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — restrict counts to questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Summary object with counts per section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandReportSummaryDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/term-mention-rates":{"get":{"operationId":"BrandSectionsController_termMentionRates","summary":"Per-term mention rates for tracked keywords/phrases","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Filtre marché. Le payload stocké couvre tous les marchés ; sous filtre, les taux sont recalculés depuis les seules réponses taguées de ce marché.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermMentionRatesResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/overview":{"get":{"operationId":"BrandSectionsController_overview","summary":"Paginated list of OverviewData per (llm, market)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter to LLMs that have data for these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOverviewPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/patient-questions":{"get":{"operationId":"BrandSectionsController_patientQuestions","summary":"Flattened, paginated list of patient questions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"sentiment","required":false,"in":"query","schema":{"enum":["positive","neutral","negative"],"type":"string"}},{"name":"q","required":false,"in":"query","description":"Full-text substring match on the question text","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Filter to a single market code, as stored on the question block.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPatientQuestionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/patient-questions/{questionKey}":{"get":{"operationId":"BrandSectionsController_patientQuestion","summary":"Full detail (answer + sources) for a single patient question","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPatientQuestionDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Patient question not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/professional-questions":{"get":{"operationId":"BrandSectionsController_professionalQuestions","summary":"Flattened, paginated list of professional questions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"sentiment","required":false,"in":"query","schema":{"enum":["positive","neutral","negative"],"type":"string"}},{"name":"q","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Filter to a single market code, as stored on the question block.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandProfessionalQuestionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/professional-questions/{questionKey}":{"get":{"operationId":"BrandSectionsController_professionalQuestion","summary":"Full detail (answer + sources) for a single professional question","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandProfessionalQuestionDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Professional question not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/payer-questions":{"get":{"operationId":"BrandSectionsController_payerQuestions","summary":"Flattened, paginated list of payer questions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"sentiment","required":false,"in":"query","schema":{"enum":["positive","neutral","negative"],"type":"string"}},{"name":"q","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Filter to a single market code, as stored on the question block.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandProfessionalQuestionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/payer-questions/{questionKey}":{"get":{"operationId":"BrandSectionsController_payerQuestion","summary":"Full detail (answer + sources) for a single payer question","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandProfessionalQuestionDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Payer question not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/competitors":{"get":{"operationId":"BrandSectionsController_competitors","summary":"Paginated list of competitors seen in the competitive analysis","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCompetitorsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/competitors/{competitorKey}/questions":{"get":{"operationId":"BrandSectionsController_competitorQuestions","summary":"Paginated list of questions asked about a competitor","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"competitorKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"q","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCompetitorQuestionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report or competitor not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/competitors/{competitorKey}/questions/{questionKey}":{"get":{"operationId":"BrandSectionsController_competitorQuestion","summary":"Full detail for a single competitor question","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"competitorKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCompetitorQuestionDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Competitor question not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/sources":{"get":{"operationId":"BrandSectionsController_sources","summary":"Paginated, flattened list of sources across LLMs and languages","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"type":"string"}},{"name":"domain","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep only sources cited by questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSourcesPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/sources/summary":{"get":{"operationId":"BrandSectionsController_sourcesSummary","summary":"Citation aggregates: total, owned share, domain ranking, citations by type, top domains per LLM, top URLs","description":"Computed from every row of /sources matching the same filters, with no row limit, so a client no longer needs to download every /sources page. One citation = one row of /sources (a link per LLM and per run, deduplicated across questions; `usageCount` is not unfolded): `total` equals the number of filtered /sources rows whose link parses as a URL. On a series id, the rows of every run in range count, as in /sources. A link is owned when its host matches an owned URL (ignoring `www.` and protocol) and, if the owned URL has a path, its path is the same or below (case-insensitive); query strings and fragments are ignored. Owned URLs are those generation applies: the series active settings, or the run snapshot for a standalone run. Every citation counts once in `byType`, once in the full `domains` ranking and once in one `topDomainsByLlm` block: each of those sums to `total`. `domainLimit`, `llmDomainLimit` and `urlLimit` only bound list lengths, never the counts; an invalid value is ignored (default kept), never a 400.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"urlLimit","required":false,"in":"query","description":"Maximum length of `topUrls`. Default 100. Integer ≥ 1, capped at 10000. Any other value is ignored and the default applies — never a 400. `urlCount` gives the number of distinct URLs before this bound.","schema":{"type":"number"}},{"name":"llmDomainLimit","required":false,"in":"query","description":"Maximum length of `domains` in each `topDomainsByLlm` block. Default 10. Integer ≥ 1, capped at 1000. Any other value is ignored and the default applies — never a 400.","schema":{"type":"number"}},{"name":"domainLimit","required":false,"in":"query","description":"Maximum length of `domains` (the domain ranking, same order as `topDomains`). Default 100; pass up to 10000 for the full ranking (`domainCount` says how many there are). Integer ≥ 1, capped at 10000. Any other value (0, negative, decimal, text) is ignored and the default applies — never a 400. Does not change `topDomains` (always the top 10), `domainCount` nor `bestOwned` (ranked on the full ranking).","schema":{"type":"number"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep only sources cited by questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSourcesSummaryResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/recommendations":{"get":{"operationId":"BrandSectionsController_recommendations","summary":"Paginated list of recommendation actions, of one or several types (all types when `type` is omitted).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"priority","required":false,"in":"query","explode":false,"style":"form","description":"Filter by priority band. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Case-insensitive (`med`, `Medium` = `Med`). Bands are the ones returned: High, Med, Low. Example: `High,Med`.","schema":{"type":"array","items":{"type":"string","enum":["High","Med","Low"]}}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"`priorityScore`: highest `priorityScore` first (ties keep the default order). Omit it to keep the default order. Keep the same value across pages of a cursor.","schema":{"enum":["priorityScore"],"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"quadrant","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Either a question audience (patient, professional, payer — same as `audience`, as on the other V1 routes) or a category of the recommendation standard (technical-foundation, owned-content, earned-reference, community-ugc). Comma-separated, OR within each kind. A standard category matches only recommendations generated with the standard on.","schema":{"type":"array","items":{"type":"string"}}},{"name":"audience","required":false,"in":"query","explode":false,"style":"form","description":"Audiences hcp, patient, payer (OR, case-insensitive; professional = hcp). A recommendation carries the audience set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources (`audiences` on each item). A recommendation tied to no audience (no patient, professional or payer prompt cites its sources) applies to every audience and is kept, so requesting all three returns the unfiltered list.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Prompt tags, comma-separated or repeated, combined with OR, case-insensitive. A recommendation carries the tags of the prompts whose answers cite one of its sources, in the same market, language and AI engine it was generated for (`tags` on each item). A recommendation that cites no source cited by a tagged prompt has no tag and matches no tag filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","explode":false,"style":"form","description":"Market filter. Recommendations are generated per (market, language) pair and tagged with their market, so `market=gb` keeps the UK recommendations even when `en` is also generated for `us` or `ca`; each item carries its `market`. Reports generated before markets were tagged fall back to the language: a language produced by a single market belongs to it, a language shared by several markets matches none.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"type","required":false,"in":"query","explode":false,"style":"form","description":"Recommendation types, comma-separated or repeated. Omitted: all three types in one list (geo, then aeo, then owned-domain; with sort=priorityScore, ranked together).","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRecommendationsPageDto"}}}},"400":{"description":"Invalid `type`, audience, category or standard label value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/recommendations-grouped":{"get":{"operationId":"BrandSectionsController_recommendationsGrouped","summary":"Recommendations de-duplicated across LLMs: near-identical actions are collapsed into one canonical entry carrying cross-LLM consensus (all types when `type` is omitted).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"priority","required":false,"in":"query","explode":false,"style":"form","description":"Filter by priority band. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Case-insensitive (`med`, `Medium` = `Med`). Bands are the ones returned: High, Med, Low. Example: `High,Med`.","schema":{"type":"array","items":{"type":"string","enum":["High","Med","Low"]}}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"`priorityScore`: highest `priorityScore` first (ties keep the default order). Omit it to keep the default order. Keep the same value across pages of a cursor.","schema":{"enum":["priorityScore"],"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"quadrant","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Either a question audience (patient, professional, payer — same as `audience`, as on the other V1 routes) or a category of the recommendation standard (technical-foundation, owned-content, earned-reference, community-ugc). Comma-separated, OR within each kind. A standard category matches only recommendations generated with the standard on.","schema":{"type":"array","items":{"type":"string"}}},{"name":"audience","required":false,"in":"query","explode":false,"style":"form","description":"Audiences hcp, patient, payer (OR, case-insensitive; professional = hcp). A recommendation carries the audience set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources (`audiences` on each item). A recommendation tied to no audience (no patient, professional or payer prompt cites its sources) applies to every audience and is kept, so requesting all three returns the unfiltered list.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Prompt tags, comma-separated or repeated, combined with OR, case-insensitive. A recommendation carries the tags of the prompts whose answers cite one of its sources, in the same market, language and AI engine it was generated for (`tags` on each item). A recommendation that cites no source cited by a tagged prompt has no tag and matches no tag filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","explode":false,"style":"form","description":"Market filter. Recommendations are generated per (market, language) pair and tagged with their market, so `market=gb` keeps the UK recommendations even when `en` is also generated for `us` or `ca`; each item carries its `market`. Reports generated before markets were tagged fall back to the language: a language produced by a single market belongs to it, a language shared by several markets matches none.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"AI engines (OR, case-insensitive): keeps an action when at least one of the engines that produced it is requested (`recommendedBy`). Grouping still runs across every engine, so consensus counts do not change with the filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"type","required":false,"in":"query","explode":false,"style":"form","description":"Recommendation types, comma-separated or repeated. Omitted: all three types in one list (geo, then aeo, then owned-domain; with sort=priorityScore, ranked together).","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}}],"responses":{"400":{"description":"Invalid `type`, audience, category or standard label value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/recommendations/{recommendationKey}":{"get":{"operationId":"BrandSectionsController_recommendation","summary":"Full detail for a single recommendation action","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRecommendationDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recommendation not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/owned-domain-audit":{"get":{"operationId":"BrandSectionsController_ownedDomainAudit","summary":"Owned domain audit object (if available)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOwnedDomainAuditResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/cloudwords":{"get":{"operationId":"BrandSectionsController_cloudwords","summary":"Paginated, flattened cloudwords across LLMs and languages","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCloudwordsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/trending-questions":{"get":{"operationId":"BrandSectionsController_trendingQuestions","summary":"Trending questions grouped by language (bounded, not paginated)","description":"No `market` filter: this section is produced per language only and carries no regional dimension.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter to languages where these LLMs have data. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTrendingQuestionsListResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/medical-regulatory-analysis":{"get":{"operationId":"BrandSectionsController_medicalRegulatoryAnalysis","summary":"Medical & regulatory analysis per language (bounded)","description":"No `market` filter: this section is produced per language only and carries no regional dimension.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandMedicalRegulatoryListResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/medical-regulatory-analysis/{language}/discoverability":{"get":{"operationId":"BrandSectionsController_medicalDiscoverability","summary":"Discoverability subsection of medical regulatory analysis for a language","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"language","required":true,"in":"path","description":"Language code (e.g. en, fr)","schema":{"type":"string"}}],"responses":{"200":{"description":"Discoverability object (shape depends on the analysis run)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Medical regulatory analysis not found for this language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/medical-regulatory-analysis/{language}/risk-benefit":{"get":{"operationId":"BrandSectionsController_medicalRiskBenefit","summary":"Risk/benefit subsection of medical regulatory analysis for a language","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"language","required":true,"in":"path","description":"Language code (e.g. en, fr)","schema":{"type":"string"}}],"responses":{"200":{"description":"Risk/benefit object (shape depends on the analysis run)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Medical regulatory analysis not found for this language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/medical-regulatory-analysis/{language}/indications-contraindications":{"get":{"operationId":"BrandSectionsController_medicalIndications","summary":"Indications & contraindications subsection of medical regulatory analysis for a language","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"language","required":true,"in":"path","description":"Language code (e.g. en, fr)","schema":{"type":"string"}}],"responses":{"200":{"description":"Indications & contraindications object (shape depends on the analysis run)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Medical regulatory analysis not found for this language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/export":{"get":{"operationId":"BrandExportController_export","summary":"Stream the full brand report as NDJSON. Unbounded — each line is a JSON object with a `type` discriminator (e.g. `summary`, `patient_question`, `competitor`, `recommendation`, ...).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"format","required":true,"in":"query","schema":{"enum":["ndjson"],"type":"string"}}],"responses":{"200":{"description":"NDJSON stream (`application/x-ndjson`). One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Unsupported export format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/ai-summary":{"get":{"operationId":"BrandAiSummaryController_aiSummary","summary":"AI summary and interpretation of the overview, following the active filters","description":"Summary and interpretation of the overview, written by a fast AI model from the figures of the overview, competitors and sources sections computed with the SAME filters (returned in `facts`, to show side by side). Every number in the text is checked against `facts` after generation (rounding and fr/en number formats tolerated); a text that fails twice is replaced by a deterministic template text (`textSource: template`). The check guarantees that no figure outside `facts` appears in the text; it does not check which product, engine or direction a figure is attached to, so show `facts` next to the text. `caveats` holds fixed sentences on the scope (active filters, filters that do not apply to visibility). Pharmaceutical compliance: factual observations about AI answers only, no promotional or comparative claim. Cached per figures, filters, prompt version and output language: instant when cached (the unfiltered view of a finished run may be pre-generated), a few seconds the first time for a new combination of filters. Beyond ~20 s the route answers 202 `{ status: \"pending\" }` with a Retry-After header: call again. A run must be done (409 `REPORT_NOT_READY` otherwise); a series needs one done run. Enabled per account (403 `FEATURE_DISABLED` otherwise). The evolution compares a run with the previous completed run of its series (a series: its last two runs).","parameters":[{"name":"id","required":true,"in":"path","description":"Brand run id or recurring series id","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates. Series only.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id. Series only.","schema":{"type":"string"}},{"name":"outputLanguage","required":false,"in":"query","description":"Language of the text (default en). The facts are language-neutral.","schema":{"enum":["en","fr"],"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`. Same limits as category.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`. Applies to the counts and sources; the visibility scores and competitors stay those of the whole report (echoed in filters.ignored.partial).","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryResponseDto"}}}},"202":{"description":"Text still being generated: call again after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryPendingResponseDto"}}}},"400":{"description":"Invalid outputLanguage, market or marketScope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"AI summary not enabled for this account (FEATURE_DISABLED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Report not done yet (REPORT_NOT_READY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/{reportId}":{"get":{"operationId":"ActModeController_getWorkspace","summary":"Get or create Act Mode workspace for a report","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace with content drafts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeWorkspaceResponseDto"}}}},"403":{"description":"Forbidden - Act Mode not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/drafts/{reportId}":{"post":{"operationId":"ActModeController_saveDraft","summary":"Create or update a content draft","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveActModeDraftDto"}}}},"responses":{"200":{"description":"Saved draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeContentDraftDto"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/drafts/{reportId}/{recommendationKey}":{"get":{"operationId":"ActModeController_getDraft","summary":"Get a single content draft","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","description":"Recommendation key (e.g. geo|Claude|en|0)","schema":{"type":"string"}}],"responses":{"200":{"description":"Content draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeContentDraftDto"}}}},"404":{"description":"Draft not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/chat/{reportId}":{"post":{"operationId":"ActModeController_chat","summary":"Send messages to ChatGPT for Act Mode and get assistant reply","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatDto"}}}},"responses":{"200":{"description":"Assistant reply","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatResponseDto"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/generate-content/{reportId}":{"post":{"operationId":"ActModeController_generateContent","summary":"Generate initial content for a recommendation (Generate Content button)","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentDto"}}}},"responses":{"200":{"description":"Generated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeGenerateContentResponseDto"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/act-mode/drafts/export/{reportId}/{recommendationKey}":{"get":{"operationId":"ActModeController_exportDraft","summary":"Export draft content for download","parameters":[{"name":"reportId","required":true,"in":"path","description":"Report ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","description":"Recommendation key","schema":{"type":"string"}},{"name":"format","required":false,"in":"query","description":"Export format","schema":{"enum":["md","txt"],"type":"string"}}],"responses":{"200":{"description":"File payload streamed as `text/markdown` (default) or `text/plain` with a `Content-Disposition: attachment; filename=\"...\"` header. The body is raw text — not a JSON object.","content":{"text/markdown":{"schema":{"type":"string","format":"binary"}},"text/plain":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Draft not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports":{"post":{"operationId":"AgnosticController_create","summary":"Create a new agnostic report","description":"Returns 200 immediately with report id and status \"running\". Generation runs in background. Poll GET /agnostic/reports/:id or GET /agnostic/reports/pending to track progress.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgnosticReportDto"}}}},"responses":{"200":{"description":"Report started; id returned immediately (report may still be generating)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgnosticReportResponseDto"}}}},"400":{"description":"Invalid data or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Plan limit reached or feature not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"AgnosticController_list","summary":"List all agnostic reports","parameters":[{"name":"page","required":false,"in":"query","description":"Page number for pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of items per page","schema":{"type":"string"}},{"name":"pathology","required":false,"in":"query","description":"Filter by pathology","schema":{"type":"string"}},{"name":"product","required":false,"in":"query","description":"Filter by product","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status (done, running, error)","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on the report title","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}}],"responses":{"200":{"description":"Paginated list of agnostic reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgnosticReportsResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/pending":{"get":{"operationId":"AgnosticController_getPendingAgnosticReport","summary":"Get pending agnostic report","parameters":[],"responses":{"200":{"description":"Pending report status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingAgnosticReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/trending-questions":{"get":{"operationId":"AgnosticController_getTrendingQuestions","summary":"Get trending questions for a pathology","parameters":[{"name":"pathology","required":true,"in":"query","description":"Pathology name","schema":{"type":"string"}},{"name":"languages","required":false,"in":"query","description":"Comma-separated list of language codes","schema":{"type":"string"}},{"name":"excludeQuestions","required":false,"in":"query","description":"JSON object of already-seen questions to exclude, keyed by audience (e.g. `{\"patient\":[\"...\"],\"professional\":[\"...\"]}`).","schema":{"type":"string"}}],"responses":{"200":{"description":"Trending questions","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"patient":{"type":"array","items":{"type":"string"}},"professional":{"type":"array","items":{"type":"string"}},"payer":{"type":"array","items":{"type":"string"}}}}}}}},"400":{"description":"Pathology parameter is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"AgnosticController_postTrendingQuestions","summary":"Generate trending questions for a pathology (POST body for large exclude lists)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticTrendingQuestionsBodyDto"}}}},"responses":{"200":{"description":"Trending questions","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"patient":{"type":"array","items":{"type":"string"}},"professional":{"type":"array","items":{"type":"string"}},"payer":{"type":"array","items":{"type":"string"}}}}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring":{"post":{"operationId":"AgnosticController_createRecurringAgnostic","summary":"Create an empty RecurringAgnosticReport shell (coquille) without running a report","description":"Safe to retry: an identical request (same account, same caller, same body) received within 10 minutes of a successful creation returns the series already created, in its current state, with the same 201 response, instead of creating a duplicate. If that series has been archived or deleted in the meantime, a new one is created.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecurringAgnosticDto"}}}},"responses":{"201":{"description":"Created RecurringAgnosticReport shell","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringAgnosticShellDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"AgnosticController_listRecurringAgnostic","summary":"List all recurring agnostic reports (paginated)","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Items per page (capped to keep response under 4MB)","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of recurring agnostic reports (data + meta)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRecurringAgnosticResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/status/{id}":{"patch":{"operationId":"AgnosticController_updateRecurringAgnosticStatus","summary":"Update recurring agnostic report status","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringAgnosticStatusDto"}}}},"responses":{"200":{"description":"Status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringAgnosticShellDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/settings/{id}":{"patch":{"operationId":"AgnosticController_updateRecurringAgnosticSettings","summary":"Update recurring agnostic report settings","description":"Returns the updated recurring agnostic with settings only (agnosticReportSettings, activeAgnosticReportSettings). Does not include generatedReports.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringAgnosticSettingsDto"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringAgnosticWithSettingsDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/evolution/{id}":{"get":{"operationId":"AgnosticController_getRecurringAgnosticEvolution","summary":"Get evolution of a recurring agnostic report (SOV, AR per report)","description":"One point per finished, non-archived run of the series (status done, legacy completed, or partial), oldest first. A run still pending or running, or one that failed, has no point: it shows up once it is finished.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date — include only generated reports with createdAt >= from.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date — include only generated reports with createdAt <= to.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous. On an evolution series the unit is a run: a run that carries no data tagged with this market is REMOVED from the series rather than reported at zero. A run that predates the opening of a market is not a collapse to zero, and drawing it as one would be a falsehood the caller cannot detect. Metrics are recomputed from the market-tagged answers, never read off the all-markets aggregate, so the numbers cannot silently include a neighbouring market.","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Recompute metrics from answers of these LLMs. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter metrics to these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Evolution data with metrics per report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticEvolutionResponseDto"}}}},"400":{"description":"Unknown or multi-valued 'market'","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/generate-now/{id}":{"post":{"operationId":"AgnosticController_generateAgnosticNow","summary":"Generate a recurring agnostic report immediately","description":"Returns 200 immediately with report id and status \"running\". Generation runs in background. Poll GET /agnostic/reports/:id or GET /agnostic/reports/pending to track progress.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report started; id returned immediately (report may still be generating)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgnosticReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Duplicate report in progress or recently created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/agnostic-report-settings":{"get":{"operationId":"AgnosticController_listAgnosticReportSettings","summary":"List all agnostic report settings for account product","parameters":[],"responses":{"200":{"description":"List of agnostic report settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/settings/{recurringId}":{"get":{"operationId":"AgnosticController_listAgnosticReportSettingsByRecurring","summary":"List agnostic report settings for a recurring agnostic report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of agnostic report settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"AgnosticController_createAgnosticReportSettings","summary":"Create agnostic report settings for a recurring agnostic report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgnosticReportSettingsDto"}}}},"responses":{"201":{"description":"Agnostic report settings created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/settings/active/{recurringId}":{"patch":{"operationId":"AgnosticController_setActiveAgnosticReportSettings","summary":"Set active agnostic report settings for a recurring agnostic report","parameters":[{"name":"recurringId","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetActiveAgnosticReportSettingsDto"}}}},"responses":{"200":{"description":"Active settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recurring agnostic report or settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/{id}/generated-reports":{"get":{"operationId":"AgnosticController_listGeneratedReportsForRecurringAgnostic","summary":"Paginated list of generated agnostic reports linked to a recurring agnostic report","description":"Returns a lightweight, cursor-paginated list of generated reports (id, title, status, timestamps). Use the modular /agnostic/reports/:reportId/... endpoints to fetch full content.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"limit","required":false,"in":"query","description":"Default 100, max 1000","schema":{"type":"number"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated generated agnostic reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticGeneratedReportsPageDto"}}}},"404":{"description":"Recurring agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/recurring/{id}":{"get":{"operationId":"AgnosticController_getRecurringAgnostic","summary":"Get a recurring agnostic report by ID (slim, without full generated report content)","description":"Returns the recurring report with settings and a slim list of generated reports (id, title, status, timestamps only). To load a full report, use GET /agnostic/reports/:reportId/... modular endpoints. To paginate through generated reports, use GET /agnostic/recurring/:id/generated-reports.","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Recurring agnostic report details (slim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringAgnosticWithSettingsDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"AgnosticController_archiveRecurringAgnostic","summary":"Archive a recurring agnostic report (soft-delete)","parameters":[{"name":"id","required":true,"in":"path","description":"Recurring agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Recurring agnostic report archived successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringAgnosticShellDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/agnostic-report-settings/parse-questions":{"post":{"operationId":"AgnosticController_parseAgnosticReportQuestions","summary":"Parse and classify questions via LLM (patient / professional)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseQuestionsBodyDto"}}}},"responses":{"200":{"description":"Classified questions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseQuestionsResponseDto"}}}},"400":{"description":"Invalid input or too many lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/agnostic-report-settings/{id}":{"get":{"operationId":"AgnosticController_getAgnosticReportSettings","summary":"Get agnostic report settings by ID","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report settings ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Agnostic report settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"put":{"operationId":"AgnosticController_updateAgnosticReportSettings","summary":"Update agnostic report settings (pathology immutable)","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report settings ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgnosticReportSettingsDto"}}}},"responses":{"200":{"description":"Agnostic report settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"AgnosticController_deleteAgnosticReportSettings","summary":"Delete agnostic report settings (blocked if active)","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report settings ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Agnostic report settings deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Cannot delete active settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/agnostic-report-settings/{id}/duplicate":{"post":{"operationId":"AgnosticController_duplicateAgnosticReportSettings","summary":"Duplicate agnostic report settings","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report settings ID","schema":{"type":"string"}}],"responses":{"201":{"description":"Agnostic report settings duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportSettingsItemDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/cancel/{id}":{"patch":{"operationId":"AgnosticController_cancelAgnosticReport","summary":"Cancel an agnostic report","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelReportResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to cancel this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/metrics/{id}":{"get":{"operationId":"AgnosticController_getMetrics","summary":"Get metrics for an agnostic report (legacy JSON metrics on the report row)","description":"Returns `reportId`, `pathology`, `market`, and `languages[]` segments with `products` and `coMentions`. For slim summary + links to modular endpoints, use GET /agnostic/reports/:id/metrics instead.","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Metrics payload keyed by language segments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticMetricsResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to access this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/export/csv/{id}":{"get":{"operationId":"AgnosticController_exportCSV","summary":"CSV export of an agnostic report","description":"One CSV file per call, chosen by type. Same file in /v2: GET /v2/reports/{id}/export?format=csv&type=….","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"metrics (default): one row per language, market and product with its appearance rate and share of voice; entities: one row per entity detected in an answer (text found, normalized text, confidence); co-mentions: one row per language, market and pair of entities cited together.","schema":{"enum":["metrics","entities","co-mentions"],"type":"string"}}],"responses":{"200":{"description":"text/csv file (attachment agnostic-report-{id}-{type}.csv)"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Agnostic exports not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}":{"get":{"operationId":"AgnosticController_getOne","summary":"Get an agnostic report by ID (DEPRECATED monolithic payload)","description":"DEPRECATED: This endpoint returns the full monolithic agnostic report and can reach 15MB+ on large fixtures. It will be removed later; the removal date will be announced in advance in the Sunset header. Prefer the modular endpoints under GET /agnostic/reports/:id/summary, /overview, /questions, /answers, /entity-mentions, /metrics, /sources, or stream with /export?format=ndjson.","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Full agnostic report. JSON fields (content, questions, answers, metrics, entities, etc.) are raw objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportDetailResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to access this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"AgnosticController_delete","summary":"Delete an agnostic report","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Report deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Not authorized to delete this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/{agnosticReportId}":{"get":{"operationId":"AgnosticActModeController_getWorkspace","summary":"Get or create Act Mode workspace for an agnostic report","parameters":[{"name":"agnosticReportId","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace with content drafts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeWorkspaceResponseDto"}}}},"403":{"description":"Forbidden - Act Mode not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/drafts/{agnosticReportId}":{"post":{"operationId":"AgnosticActModeController_saveDraft","summary":"Create or update a content draft","parameters":[{"name":"agnosticReportId","required":true,"in":"path","description":"Agnostic report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveActModeDraftDto"}}}},"responses":{"200":{"description":"Saved draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeContentDraftDto"}}}}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/drafts/{agnosticReportId}/{recommendationKey}":{"get":{"operationId":"AgnosticActModeController_getDraft","summary":"Get a single content draft","parameters":[{"name":"agnosticReportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Content draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeContentDraftDto"}}}}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/chat/{agnosticReportId}":{"post":{"operationId":"AgnosticActModeController_chat","summary":"Send messages to ChatGPT for Act Mode and get assistant reply","parameters":[{"name":"agnosticReportId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatDto"}}}},"responses":{"200":{"description":"Assistant reply","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatResponseDto"}}}}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/generate-content/{agnosticReportId}":{"post":{"operationId":"AgnosticActModeController_generateContent","summary":"Generate initial content for a recommendation","parameters":[{"name":"agnosticReportId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentDto"}}}},"responses":{"200":{"description":"Generated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeGenerateContentResponseDto"}}}}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/act-mode/drafts/export/{agnosticReportId}/{recommendationKey}":{"get":{"operationId":"AgnosticActModeController_exportDraft","summary":"Export draft content for download","parameters":[{"name":"agnosticReportId","required":true,"in":"path","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"format","required":false,"in":"query","schema":{"enum":["md","txt"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Agnostic Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/summary":{"get":{"operationId":"AgnosticSectionsController_summary","summary":"Lightweight metadata and counters for an agnostic report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — restrict counts to questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter counts to answers from these LLMs. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticReportSummaryDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/personas":{"get":{"operationId":"AgnosticSectionsController_personas","summary":"Persona-contextualized answers for this agnostic report (WS2)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Record<personaId, { personaName, base, answers }>"},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/term-mention-rates":{"get":{"operationId":"AgnosticSectionsController_termMentionRates","summary":"Per-term mention rates for tracked keywords/phrases","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Filtre marché. Le payload stocké couvre tous les marchés ; sous filtre, les taux sont recalculés depuis les seules réponses taguées de ce marché.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermMentionRatesResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/overview":{"get":{"operationId":"AgnosticSectionsController_overview","summary":"Singleton AgnosticOverviewData object (bounded)","description":"Same formulas with or without filters, so a filter covering every value returns the unfiltered object: topProducts = top 10 by share of voice; appearanceRate = answers citing the product / answers (pooled over every market × language segment); shareOfVoice = mentions weighted by source authority × confidence / total; overallReliability = mean source reliability of the grounded answers (0-100, rounded); citationFrequency = answers citing an owned domain / grounded answers (0-100). questionsGenerated counts the questions of the scope (category, tags, language, market); an llm filter removes none.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — restrict the overview to questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticOverviewResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/questions":{"get":{"operationId":"AgnosticSectionsController_questions","summary":"Paginated list of brand-free questions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"intent","required":false,"in":"query","schema":{"type":"string"}},{"name":"isProductTrigger","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Keep questions answered by these LLMs. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticQuestionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/questions/{questionId}":{"get":{"operationId":"AgnosticSectionsController_question","summary":"Get a single question by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticBrandFreeQuestionDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Question not found in this report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/questions/{questionId}/answers":{"get":{"operationId":"AgnosticSectionsController_questionAnswers","summary":"Paginated list of answers for a given question","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticAnswersPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report or question not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/answers":{"get":{"operationId":"AgnosticSectionsController_answers","summary":"Flattened, paginated list of answers. Supports patient/professional filtering via logical join on questions[].category.","description":"`detectedEntities` is the raw per-answer detection field (names kept only when literally present under their canonical form). Metrics, counts.entityMentions and /entity-mentions read the report entity mentions, which also keep products found under a synonym (e.g. an INN): use those routes to count.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"questionId","required":false,"in":"query","schema":{"type":"string"}},{"name":"intent","required":false,"in":"query","schema":{"type":"string"}},{"name":"isProductTrigger","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep answers with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticAnswersPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/answers/{answerKey}":{"get":{"operationId":"AgnosticSectionsController_answer","summary":"Detail for a single answer, keyed by synthetic answerKey","description":"`detectedEntities` is the raw per-answer detection field (names kept only when literally present under their canonical form). Metrics, counts.entityMentions and /entity-mentions read the report entity mentions, which also keep products found under a synonym (e.g. an INN): use those routes to count.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"answerKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticAnswerDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Answer not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/answers/{answerKey}/sources":{"get":{"operationId":"AgnosticSectionsController_answerSources","summary":"Paginated list of sources attached to a specific answer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"answerKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticAnswerSourcesPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Answer not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/answers/{answerKey}/entity-mentions":{"get":{"operationId":"AgnosticSectionsController_answerEntityMentions","summary":"Paginated list of entity mentions detected inside a specific answer","description":"Same item shape and same mentions as GET /entity-mentions (the report entity mentions, synonyms included), scoped to one answerKey. May list more than the raw `detectedEntities` field of the answer.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"answerKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticEntityMentionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Answer not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/entity-mentions":{"get":{"operationId":"AgnosticSectionsController_entityMentions","summary":"Flattened, paginated list of all entity mentions (one row per occurrence)","description":"Returns the mention rows the metrics count — the report entity mentions joined to their answer, synonyms included — with answer context (answerKey, llm, language, questionId, category). The raw answers[].detectedEntities field can hold fewer. Not aggregated: there is no count per entity on this route — use GET /metrics/products for mentionCount / shareOfVoice. Fields are text, normalizedText, entityType (not name/type/count).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"entityId","required":false,"in":"query","schema":{"type":"string"}},{"name":"entityType","required":false,"in":"query","schema":{"enum":["PRODUCT","MOLECULE","SYMPTOM","MODALITY","COMPETITOR","CLASS"],"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticEntityMentionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/metrics":{"get":{"operationId":"AgnosticSectionsController_metrics","summary":"Slim metrics summary per (market, language). Returns compteurs uniquement; utiliser /metrics/products et /metrics/co-mentions pour les datasets paginés.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"include","required":false,"in":"query","description":"Opt-in: 'products,coMentions' pour inclure les listes complètes (réponse potentiellement lourde — utiliser avec précaution).","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticMetricsSummaryResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/metrics/products":{"get":{"operationId":"AgnosticSectionsController_productMetrics","summary":"Paginated list of product metrics across languages","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"minShareOfVoice","required":false,"in":"query","description":"Ratio 0-1. Drops products under this share of voice. No default: the full long tail is returned.","schema":{"type":"string"}},{"name":"minAppearanceRate","required":false,"in":"query","description":"Ratio 0-1. Drops products under this appearance rate. No default: the full long tail is returned.","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — restrict metrics to questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticProductMetricsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/metrics/co-mentions":{"get":{"operationId":"AgnosticSectionsController_coMentions","summary":"Paginated list of entity co-mentions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"entityId","required":false,"in":"query","schema":{"type":"string"}},{"name":"entityType","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticCoMentionsPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/sources":{"get":{"operationId":"AgnosticSectionsController_sources","summary":"Paginated list of sources across LLMs, languages and question categories","description":"On a single run, one row = one citation (a link cited in one answer). Its language, category, market and tags are those of the answer that cites it, so the filtered row count equals `total` of /sources/summary.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"type":"string"}},{"name":"domain","required":false,"in":"query","schema":{"type":"string"}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep only sources cited by questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticSourcesPageDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/sources/summary":{"get":{"operationId":"AgnosticSectionsController_sourcesSummary","summary":"Citation aggregates: total, owned share, domain ranking, citations by type, top domains per LLM, top URLs","description":"Computed from every answer matching the filters, with no row limit — the same filters as /sources, so a client no longer needs to download every /sources page to rank domains or URLs. One citation = one cited link in one answer, i.e. one row of /sources on a single run. On a series id, /sources keeps one row per (LLM, URL) across runs, whereas this route counts every citation of every run. Filters apply per answer. Links that are empty or do not parse as a URL are not citations. A link is owned when its host matches an owned URL (ignoring `www.` and protocol) and, if the owned URL has a path, its path is the same or below (case-insensitive); query strings and fragments are ignored. Owned URLs are read from the series active settings, or from the run snapshot for a standalone run. Every citation counts once in `byType`, once in the full `domains` ranking and once in one `topDomainsByLlm` block: each of those sums to `total`. `domainLimit`, `llmDomainLimit` and `urlLimit` only bound list lengths, never the counts; an invalid value is ignored (default kept), never a 400.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"urlLimit","required":false,"in":"query","description":"Maximum length of `topUrls`. Default 100. Integer ≥ 1, capped at 10000. Any other value is ignored and the default applies — never a 400. `urlCount` gives the number of distinct URLs before this bound.","schema":{"type":"number"}},{"name":"llmDomainLimit","required":false,"in":"query","description":"Maximum length of `domains` in each `topDomainsByLlm` block. Default 10. Integer ≥ 1, capped at 1000. Any other value is ignored and the default applies — never a 400.","schema":{"type":"number"}},{"name":"domainLimit","required":false,"in":"query","description":"Maximum length of `domains` (the domain ranking, same order as `topDomains`). Default 100; pass up to 10000 for the full ranking (`domainCount` says how many there are). Integer ≥ 1, capped at 10000. Any other value (0, negative, decimal, text) is ignored and the default applies — never a 400. Does not change `topDomains` (always the top 10), `domainCount` nor `bestOwned` (ranked on the full ranking).","schema":{"type":"number"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Comma-separated tags — keep only citations from questions with ≥1 matching tag. Unknown tags are ignored.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticSourcesSummaryResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/recommendations":{"get":{"operationId":"AgnosticSectionsController_recommendations","summary":"Paginated list of recommendation actions, of one or several types (all types when `type` is omitted).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"priority","required":false,"in":"query","explode":false,"style":"form","description":"Filter by priority band. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Case-insensitive (`med`, `Medium` = `Med`). Bands are the ones returned: High, Med, Low. Example: `High,Med`.","schema":{"type":"array","items":{"type":"string","enum":["High","Med","Low"]}}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"`priorityScore`: highest `priorityScore` first (ties keep the default order). Omit it to keep the default order. Keep the same value across pages of a cursor.","schema":{"enum":["priorityScore"],"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"quadrant","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Either a question audience (patient, professional, payer — same as `audience`, as on the other V1 routes) or a category of the recommendation standard (technical-foundation, owned-content, earned-reference, community-ugc). Comma-separated, OR within each kind. A standard category matches only recommendations generated with the standard on.","schema":{"type":"array","items":{"type":"string"}}},{"name":"audience","required":false,"in":"query","explode":false,"style":"form","description":"Audiences hcp, patient, payer (OR, case-insensitive; professional = hcp). A recommendation carries the audience set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources (`audiences` on each item). A recommendation tied to no audience (no patient, professional or payer prompt cites its sources) applies to every audience and is kept, so requesting all three returns the unfiltered list.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Prompt tags, comma-separated or repeated, combined with OR, case-insensitive. A recommendation carries the tags of the prompts whose answers cite one of its sources, in the same market, language and AI engine it was generated for (`tags` on each item). A recommendation that cites no source cited by a tagged prompt has no tag and matches no tag filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","explode":false,"style":"form","description":"Market filter. Recommendations are generated per (market, language) pair and tagged with their market, so `market=gb` keeps the UK recommendations even when `en` is also generated for `us` or `ca`; each item carries its `market`. Reports generated before markets were tagged fall back to the language: a language produced by a single market belongs to it, a language shared by several markets matches none.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"type","required":false,"in":"query","explode":false,"style":"form","description":"Recommendation types, comma-separated or repeated. Omitted: all three types in one list (geo, then aeo, then owned-domain; with sort=priorityScore, ranked together).","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRecommendationsPageDto"}}}},"400":{"description":"Invalid `type`, audience, category or standard label value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/recommendations-grouped":{"get":{"operationId":"AgnosticSectionsController_recommendationsGrouped","summary":"Recommendations de-duplicated across LLMs: near-identical actions are collapsed into one canonical entry carrying cross-LLM consensus (all types when `type` is omitted).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"string"}},{"name":"priority","required":false,"in":"query","explode":false,"style":"form","description":"Filter by priority band. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Case-insensitive (`med`, `Medium` = `Med`). Bands are the ones returned: High, Med, Low. Example: `High,Med`.","schema":{"type":"array","items":{"type":"string","enum":["High","Med","Low"]}}},{"name":"includeTotal","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"`priorityScore`: highest `priorityScore` first (ties keep the default order). Omit it to keep the default order. Keep the same value across pages of a cursor.","schema":{"enum":["priorityScore"],"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"quadrant","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","explode":false,"style":"form","description":"Label of the recommendation standard (comma-separated, OR). Matches only recommendations generated with the standard on (`action.standard`).","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Either a question audience (patient, professional, payer — same as `audience`, as on the other V1 routes) or a category of the recommendation standard (technical-foundation, owned-content, earned-reference, community-ugc). Comma-separated, OR within each kind. A standard category matches only recommendations generated with the standard on.","schema":{"type":"array","items":{"type":"string"}}},{"name":"audience","required":false,"in":"query","explode":false,"style":"form","description":"Audiences hcp, patient, payer (OR, case-insensitive; professional = hcp). A recommendation carries the audience set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources (`audiences` on each item). A recommendation tied to no audience (no patient, professional or payer prompt cites its sources) applies to every audience and is kept, so requesting all three returns the unfiltered list.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Prompt tags, comma-separated or repeated, combined with OR, case-insensitive. A recommendation carries the tags of the prompts whose answers cite one of its sources, in the same market, language and AI engine it was generated for (`tags` on each item). A recommendation that cites no source cited by a tagged prompt has no tag and matches no tag filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","explode":false,"style":"form","description":"Market filter. Recommendations are generated per (market, language) pair and tagged with their market, so `market=gb` keeps the UK recommendations even when `en` is also generated for `us` or `ca`; each item carries its `market`. Reports generated before markets were tagged fall back to the language: a language produced by a single market belongs to it, a language shared by several markets matches none.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"AI engines (OR, case-insensitive): keeps an action when at least one of the engines that produced it is requested (`recommendedBy`). Grouping still runs across every engine, so consensus counts do not change with the filter.","schema":{"type":"array","items":{"type":"string"}}},{"name":"type","required":false,"in":"query","explode":false,"style":"form","description":"Recommendation types, comma-separated or repeated. Omitted: all three types in one list (geo, then aeo, then owned-domain; with sort=priorityScore, ranked together).","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}}],"responses":{"400":{"description":"Invalid `type`, audience, category or standard label value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/recommendations/{recommendationKey}":{"get":{"operationId":"AgnosticSectionsController_recommendation","summary":"Full detail for a single recommendation action","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRecommendationDetailDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Recommendation not found for this key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/owned-domain-audit":{"get":{"operationId":"AgnosticSectionsController_ownedDomainAudit","summary":"Owned domain audit object (if available)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOwnedDomainAuditResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/tracked-products":{"get":{"operationId":"AgnosticSectionsController_trackedProducts","summary":"List of products tracked on this agnostic report. With llm/language filters, returns only products detected in the matching answers.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticTrackedProductsResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/export":{"get":{"operationId":"AgnosticExportController_export","summary":"Stream the full agnostic report as NDJSON. Unbounded — each line is a JSON object with a `type` discriminator (e.g. `summary`, `question`, `answer`, `entity_mention`, `source`, ...).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"format","required":true,"in":"query","schema":{"enum":["ndjson"],"type":"string"}}],"responses":{"200":{"description":"NDJSON stream (`application/x-ndjson`). One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Unsupported export format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/ai-summary":{"get":{"operationId":"AgnosticAiSummaryController_aiSummary","summary":"AI summary and interpretation of the overview, following the active filters","description":"Summary and interpretation of the overview, written by a fast AI model from the figures of the overview, competitors and sources sections computed with the SAME filters (returned in `facts`, to show side by side). Every number in the text is checked against `facts` after generation (rounding and fr/en number formats tolerated); a text that fails twice is replaced by a deterministic template text (`textSource: template`). The check guarantees that no figure outside `facts` appears in the text; it does not check which product, engine or direction a figure is attached to, so show `facts` next to the text. `caveats` holds fixed sentences on the scope (active filters, filters that do not apply to visibility). Pharmaceutical compliance: factual observations about AI answers only, no promotional or comparative claim. Cached per figures, filters, prompt version and output language: instant when cached (the unfiltered view of a finished run may be pre-generated), a few seconds the first time for a new combination of filters. Beyond ~20 s the route answers 202 `{ status: \"pending\" }` with a Retry-After header: call again. A run must be done (409 `REPORT_NOT_READY` otherwise); a series needs one done run. Enabled per account (403 `FEATURE_DISABLED` otherwise). The evolution compares a run with the previous completed run of its series (a series: its last two runs).","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic run id or recurring series id","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time — start (inclusive) of the run `createdAt` range. Series ids only: ignored on a run id, whose content does not depend on dates. Series only.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO date or date-time — end (inclusive) of the run `createdAt` range. A date without time (`2026-10-14`) includes that whole day (until 23:59:59.999 UTC). Series ids only: ignored on a run id. Series only.","schema":{"type":"string"}},{"name":"outputLanguage","required":false,"in":"query","description":"Language of the text (default en). The facts are language-neutral.","schema":{"enum":["en","fr"],"type":"string"}},{"name":"tags","required":false,"in":"query","explode":false,"style":"form","description":"Filter by question tag. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Tags are matched case-insensitively; unknown tags are ignored. Example: `key-message-expressions|efficacy,key-message-expressions|safety`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryResponseDto"}}}},"202":{"description":"Text still being generated: call again after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryPendingResponseDto"}}}},"400":{"description":"Invalid outputLanguage, market or marketScope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"AI summary not enabled for this account (FEATURE_DISABLED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Report not done yet (REPORT_NOT_READY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/suggest-questions":{"post":{"operationId":"MergedController_suggestQuestions","summary":"Suggest treatment-intent questions for the report wizard","description":"Generates questions a real user would ask an AI assistant when looking for a treatment for the pathology. All suggestions carry intent \"treatment\". scope=market (default) returns brand-free questions (brand/competitors are only used to filter out leaking suggestions); scope=brand returns questions centered on the provided brand. When scope=brand and competitors are provided, extra \"competitive\" questions are appended on top of count, each using the literal placeholder {COMPETITOR} instead of any real competitor name.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestQuestionsDto"}}}},"responses":{"201":{"description":"Suggested questions with category and intent"},"400":{"description":"Invalid input (e.g. scope=brand without brand)"},"502":{"description":"Suggestion LLM call failed"}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports":{"post":{"operationId":"MergedController_create","summary":"Create a merged report (market + optional brand)","description":"Returns immediately with report id and status \"pending\". Generation runs in background. Poll GET /merged/reports/:id to track progress.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMergedReportDto"}}}},"responses":{"201":{"description":"Report created; generation running in background"},"400":{"description":"Invalid input"}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"MergedController_list","summary":"List merged reports","parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"pathology","required":false,"in":"query","schema":{"type":"string"}},{"name":"brand","required":false,"in":"query","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on title","schema":{"type":"string"}},{"name":"recurringId","required":false,"in":"query","description":"Only the runs of this analysis (recurring series)","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}":{"get":{"operationId":"MergedController_getOne","summary":"Get a merged report by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"MergedController_archive","summary":"Archive a merged report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/questions":{"get":{"operationId":"MergedSectionsController_questions","summary":"Questions — filterable by scope/category/language, cursor-paginated","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"enum":["market","brand"],"type":"string"}},{"name":"market","required":false,"in":"query","description":"Keep questions answered in this market. Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — keep questions with ≥1 matching tag. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/answers":{"get":{"operationId":"MergedSectionsController_answers","summary":"Answers — filterable by scope/category/llm/language/questionId/sentiment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"enum":["market","brand"],"type":"string"}},{"name":"market","required":false,"in":"query","description":"Filter to a single market code, as stored on the question block.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{"type":"string"}},{"name":"questionId","required":false,"in":"query","schema":{"type":"string"}},{"name":"sentiment","required":false,"in":"query","schema":{"enum":["positive","neutral","negative","not_mentioned"],"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — keep answers with ≥1 matching tag. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/sources":{"get":{"operationId":"MergedSectionsController_sources","summary":"Deduplicated sources — filterable by scope/owned/domain and by the answers that cite them","description":"Without a perimeter filter, each source carries its counters over the whole report. With any of market, marketScope, tags, llm, language, category or scope, `citationCount`, `citationCountByScope`, `byLlm`, `languages` and `scope` are recounted over the answers matching ALL of them, on the stored basis (raw links: a link repeated inside one answer counts each time). Where the stored data does not tell which answer repeated a link, the source's stored count is split over its citing answers so that its totals per LLM and per scope are kept: a filter covering every value returns the unfiltered list, and partitions (us + eu, one LLM after another) add up to the stored counts. A source all citing answers of which match is returned as stored; sources the filter leaves without citation are omitted, and so is a source no answer cites at all; the list is sorted by the recounted `citationCount` (descending) and `total` is the count after filtering. Under `scope=market|brand`, a 'both' source shows the citations of that scope only.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","description":"Count only citations from answers of this scope.","schema":{"enum":["market","brand"],"type":"string"}},{"name":"owned","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"domain","required":false,"in":"query","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","description":"Count only citations from answers generated in this market. Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Count only citations from answers of these categories (comma-separated, OR). Unknown values are ignored (a value no allowed one matches leaves the filter off) rather than answering 400, as this route ignored the parameter before it existed; they are named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Count only citations from answers in these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Count only citations from these LLMs' answers. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string"}}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — count only citations from answers with ≥1 matching tag. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/entities":{"get":{"operationId":"MergedSectionsController_entities","summary":"Detected entities — filterable by type/isCompetitor and by the answers that mention them","description":"Without a perimeter filter, each entity carries its counters over the whole report. With any of market, marketScope, tags, llm, language, category or scope, `mentionCount`, `byLlm` and `sentiment` are recounted over the answers matching ALL of them, on the stored basis: the entity's stored mention count is split over the answers naming it so that its per-LLM counts are kept (a filter covering every value returns the unfiltered list). An entity all mentioning answers of which match is returned as stored; entities the filter leaves without mention are omitted, those already at zero in the report (brand and competitors always listed) are kept; the list is sorted by the recounted `mentionCount` (descending).","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"enum":["product","organization","condition","other"],"type":"string"}},{"name":"isCompetitor","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"market","required":false,"in":"query","description":"Count only mentions in answers generated in this market. Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Count only mentions in answers of these categories (comma-separated, OR). Unknown values are ignored (a value no allowed one matches leaves the filter off) rather than answering 400, as this route ignored the parameter before it existed; they are named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Count only mentions in answers in these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Count only mentions in these LLMs' answers. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string"}}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — count only mentions in answers with ≥1 matching tag. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{}},{"name":"scope","required":false,"in":"query","description":"Count only mentions in answers of this scope. Unknown values are ignored (a value no allowed one matches leaves the filter off) rather than answering 400, as this route ignored the parameter before it existed; they are named in the X-Ignored-Filters response header.","schema":{"enum":["market","brand"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/metrics":{"get":{"operationId":"MergedSectionsController_metrics","summary":"GEO KPIs: share of voice, brand presence, sentiment, term mentions, citations","description":"Without llm, language, category or tags: the stored KPIs of the report, or of one market with `market` (its citation KPIs counted over that market's answers). With any of them: the same Metrics shape recomputed over the answers matching ALL the filters (and `market` when given); `data` is null when no answer matches, never zeroed KPIs. As stored at generation, `sentiment.overall`, `sentiment.byLlm` and `sentiment.byCategory` count every scored answer, brand-scope included, whereas `sentiment.market.*`, `brandPresence.overall/byLlm/byLanguage`, `shareOfVoice` and `marketAppearance` count market (brand-free) answers only. `citations.total`, `ownedDomainShare` and `topDomains` count raw links (a link listed twice in one answer counts twice), whereas `citations.byLanguage` keeps its stored basis, one count per answer citing a source: the per-language totals can therefore add up to less than `citations.total`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","description":"Return metrics for this market only (multi-market reports). Single value here, unlike the filters on the other endpoints: this route SELECTS one stored metrics blob rather than filtering a collection, so a list would be silently truncated. Issue one request per market, or use /metrics-by-market.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — recompute over the answers with ≥1 matching tag. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Recompute over the answers of these categories (comma-separated, OR). Unknown values are ignored (a value no allowed one matches leaves the filter off) rather than answering 400, as this route ignored the parameter before it existed; they are named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Recompute over the answers in these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Recompute over these LLMs' answers. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/metrics-by-market":{"get":{"operationId":"MergedSectionsController_metricsByMarket","summary":"Per-market GEO KPIs — { market: Metrics } when the report used markets.","description":"`citations.total`, `ownedDomainShare` and `topDomains` count raw links (a link listed twice in one answer counts twice), whereas `citations.byLanguage` keeps its stored basis, one count per answer citing a source: the per-language totals can therefore add up to less than `citations.total`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/analyses":{"get":{"operationId":"MergedSectionsController_analyses","summary":"All analyses: recommendations, competitive, medical-regulatory, word cloud, trending","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/analyses/{section}":{"get":{"operationId":"MergedSectionsController_analysesSection","summary":"One analysis section","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"section","required":true,"in":"path","schema":{"enum":["recommendations","recommendationsSynthesis","competitive","medicalRegulatory","wordCloud","trending"],"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Section `recommendations` only. Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","explode":false,"style":"form","description":"Section `recommendations` only: keep the recommendations generated for these markets. A run generated per (market, language) tags each recommendation with its `marketCode`; an untagged recommendation belongs to the run's market when it has a single one, and to none when it spans several. On any other section the parameter is ignored and named in the X-Ignored-Filters header. Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/insights":{"get":{"operationId":"MergedSectionsController_insights","summary":"Cross-cutting insights (opportunities / risks / observations)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/personas":{"get":{"operationId":"MergedSectionsController_personas","summary":"Persona bundle: ids, frozen snapshots, per-persona slices, comparison","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/recurring":{"post":{"operationId":"MergedRecurringController_create","summary":"Create a recurring merged report","parameters":[],"responses":{"201":{"description":""}},"tags":["merged-recurring"]},"get":{"operationId":"MergedRecurringController_list","summary":"List recurring merged reports","parameters":[{"name":"page","required":false,"in":"query","description":"1-based page index.","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Page size.","schema":{"type":"number"}},{"name":"isActive","required":false,"in":"query","description":"Keep only active (`true`) or inactive (`false`) schedules.","schema":{"type":"boolean"}},{"name":"from","required":false,"in":"query","description":"ISO 8601 date or date-time — include only schedules whose last run (`lastRunAt`) is at or after this instant. A schedule that never ran is excluded once a bound is set. Invalid date → 400.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO 8601 date or date-time — include only schedules whose last run (`lastRunAt`) is at or before this instant. A date without time (YYYY-MM-DD) means the end of that day (UTC). Invalid date → 400.","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}":{"get":{"operationId":"MergedRecurringController_getOne","summary":"Get a recurring merged report by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"reportsFrom","required":false,"in":"query","description":"ISO 8601 date or date-time — include only generated runs with createdAt >= this instant. Invalid date → 400.","schema":{"type":"string"}},{"name":"reportsTo","required":false,"in":"query","description":"ISO 8601 date or date-time — include only generated runs with createdAt <= this instant. A date without time (YYYY-MM-DD) means the end of that day (UTC). Invalid date → 400.","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["merged-recurring"]},"delete":{"operationId":"MergedRecurringController_archive","summary":"Archive a recurring merged report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}/evolution":{"get":{"operationId":"MergedRecurringController_evolution","summary":"KPI evolution across the runs of a recurring merged report","description":"One point per done, non-archived run of the series (recommendation re-runs excluded), oldest first: `{ recurringId, points: [{ reportId, createdAt, sentimentEngine, metrics }], truncated }`. `sentimentEngine` names the scorer of the run's sentiment (null = the earlier scoring, overall tone of the answer): two runs with different engines do not compare in sentiment. Only the `limit` most recent runs inside from/to are read; `truncated` is true when older ones were left out. Each `metrics` is exactly what GET /merged/reports/:reportId/metrics returns with the same market, llm, language, category and tags; a run for which that route returns null (a market it was not generated for, a filter matching none of its answers) has no point, and a run archived while the response is computed is skipped. Versioned on the runs it reads: send If-None-Match to get a 304 without any computation while nothing changed. `citations.total`, `ownedDomainShare` and `topDomains` count raw links (a link listed twice in one answer counts twice), whereas `citations.byLanguage` keeps its stored basis, one count per answer citing a source: the per-language totals can therefore add up to less than `citations.total`.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"ISO 8601 date or date-time — runs created at or after this instant (a date-time without zone is UTC). Invalid date → 400.","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"ISO 8601 date or date-time — runs created at or before this instant; a bare date (YYYY-MM-DD) means the end of that day (UTC). Invalid date → 400.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"How many of the most recent runs to read. Default 36 (max 120) without market or answer filters, 12 (max 24) with them, as each run's answers are then read. Larger values are lowered to the max; a non-positive or non-integer value → 400.","schema":{"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Comma-separated tags — recompute over the answers with ≥1 matching tag.","schema":{}},{"name":"category","required":false,"in":"query","explode":false,"style":"form","description":"Filter by audience category. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Unlike `llm` and `language`, this is a closed enumeration: a value outside it is a malformed request and returns 400 rather than an empty result. Example: `patient,professional`.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"market","required":false,"in":"query","description":"One market code, as on /metrics. Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous. A list returns 400 here.","schema":{}}],"responses":{"304":{"description":"If-None-Match matches the current version of the series runs"},"400":{"description":"Unknown or multiple market, unknown category, invalid date or limit"},"404":{"description":"Recurring report not found"}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}/status":{"patch":{"operationId":"MergedRecurringController_updateStatus","summary":"Enable or disable a recurring merged report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}/settings":{"patch":{"operationId":"MergedRecurringController_updateSettings","summary":"Update settings of a recurring merged report","description":"Patch semantics — absent fields keep their current value. Any change to the analysis configuration writes a new settings version and moves the active pointer onto it; past runs keep the version they were generated under.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMergedRecurringSettingsDto"}}}},"responses":{"200":{"description":"Updated recurring report with its settings history"},"400":{"description":"Invalid payload, or the series has no active settings"},"404":{"description":"Recurring report not found"},"409":{"description":"Another live series already tracks this pathology and brand"}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}/name":{"patch":{"operationId":"MergedRecurringController_updateName","summary":"Rename a recurring merged report","description":"Sets the display name, stored in `metadata.name` (other metadata keys are kept). `null` or an empty string restores the default \"brand · pathology\" label. Writes no settings version.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMergedRecurringNameDto"}}}},"responses":{"200":{"description":"Updated recurring report, same shape as GET /merged/recurring/:id"},"400":{"description":"Missing `name`, not a string, or longer than 80 characters"},"404":{"description":"Recurring report not found"}},"tags":["merged-recurring"]}},"/v1/merged/recurring/{id}/generate-now":{"post":{"operationId":"MergedRecurringController_generateNow","summary":"Immediately trigger generation for a recurring merged report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["merged-recurring"]}},"/v1/merged/act-mode/drafts/export/{reportId}/{recommendationKey}":{"get":{"operationId":"MergedActModeController_exportDraft","summary":"Export draft (merged report)","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}},{"name":"format","required":false,"in":"query","schema":{"enum":["md","txt"],"type":"string"}}],"responses":{"200":{"description":"File content"}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/act-mode/drafts/{reportId}/{recommendationKey}":{"get":{"operationId":"MergedActModeController_getDraft","summary":"Get a single content draft","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/act-mode/drafts/{reportId}":{"get":{"operationId":"MergedActModeController_listDrafts","summary":"List the content drafts of a merged report, without creating its workspace","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"MergedActModeController_saveDraft","summary":"Create or update a content draft (merged report)","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveActModeDraftDto"}}}},"responses":{"201":{"description":""}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/act-mode/chat/{reportId}":{"post":{"operationId":"MergedActModeController_chat","summary":"Act Mode chat for merged report","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatDto"}}}},"responses":{"201":{"description":""}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/act-mode/generate-content/{reportId}":{"post":{"operationId":"MergedActModeController_generateContent","summary":"Generate content for a merged report recommendation","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentDto"}}}},"responses":{"201":{"description":""}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/act-mode/{reportId}":{"get":{"operationId":"MergedActModeController_getWorkspace","summary":"Get or create Act Mode workspace for a merged report","parameters":[{"name":"reportId","required":true,"in":"path","description":"Merged report ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace with content drafts"}},"tags":["Merged Reports - Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/recommendation-statuses":{"get":{"operationId":"MergedRecommendationStatusController_list","summary":"List persisted recommendation workflow statuses for a report","description":"One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/recommendations/{recoKey}/status":{"put":{"operationId":"MergedRecommendationStatusController_upsert","summary":"Upsert the workflow status of one recommendation","description":"One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"recoKey","required":true,"in":"path","description":"Merged Recommendation.id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecommendationStatusDto"}}}},"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/recommendations/{recoKey}/rerun":{"post":{"operationId":"MergedRerunController_rerun","summary":"Re-run a report targeting one recommendation","description":"Creates a NEW merged report replaying the source config, linked to the recommendation. Same credit gating as normal creation. Returns immediately with the new report id (status \"pending\").","parameters":[{"name":"id","required":true,"in":"path","description":"Source MergedReport id","schema":{"type":"string"}},{"name":"recoKey","required":true,"in":"path","description":"Merged Recommendation.id to re-run against","schema":{"type":"string"}}],"responses":{"201":{"description":"Follow-up report created; generation running in background"}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/recommendations/{recoKey}/impact":{"get":{"operationId":"MergedRerunController_impact","summary":"Metric delta between the source report and the latest follow-up run","description":"Returns null deltas when no follow-up exists yet or it has not finished. Reuses per-run metrics — no recomputation.","parameters":[{"name":"id","required":true,"in":"path","description":"Source MergedReport id","schema":{"type":"string"}},{"name":"recoKey","required":true,"in":"path","description":"Merged Recommendation.id","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/answer-diff":{"get":{"operationId":"MergedDriftController_answerDiffEndpoint","summary":"Diff raw answers between two runs of a recurring series (auto = previous run). Matches on the stable question identity per LLM & language.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"against","required":false,"in":"query","description":"Report id to compare against; omit to auto-select the previous run of the series.","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"enum":["changed","stable","new","dropped"],"type":"string"}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched case-insensitively against the lowercase ISO codes stored in the report (`FR` matches `fr`). Values not present in this report are ignored rather than voiding the result. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`. At most 50 values are used; the others are ignored and named in the X-Ignored-Filters response header.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/drift-alerts":{"get":{"operationId":"MergedDriftController_reportAlerts","summary":"List persisted drift alerts for a report","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/drift-alerts/read":{"post":{"operationId":"MergedDriftController_markReportRead","summary":"Mark all drift alerts of a report as read","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/drift-alerts":{"get":{"operationId":"MergedDriftController_accountAlerts","summary":"Account-wide drift alerts feed for the notification bell","parameters":[{"name":"unreadOnly","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/drift-alerts/{alertId}/read":{"patch":{"operationId":"MergedDriftController_markRead","summary":"Mark one drift alert as read","parameters":[{"name":"alertId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/demo":{"get":{"operationId":"MergedDemoController_getDemo","summary":"Read-only demonstration merged report","description":"Returns a full, internally consistent example report (meta + all sections inline) with isDemo=true. No DB row, no credits, never appears in a real report list. Render it read-only for a first-run \"explore an example\" experience.","parameters":[],"responses":{"200":{"description":"Full demo MergedReportUnified payload"}},"tags":["Merged Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/admin/reports/{id}/relaunch":{"post":{"operationId":"MergedAdminController_relaunch","summary":"Relaunch a merged report (service-token guarded)","description":"Reconstructs the original run config from the stored report and creates a new merged report under the same account and author. Re-reserves credits like any create.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"New report created; generation running in background"},"404":{"description":"Report not found"},"409":{"description":"Config could not be reconstructed"}},"tags":["Merged Reports Admin"],"security":[{"admin-service-token":[]}]}},"/v1/merged/admin/reports/{id}/archive":{"post":{"operationId":"MergedAdminController_archive","summary":"Archive a merged report (service-token guarded)","description":"Sets archivedAt on the merged report. Idempotent — archiving an already archived report still returns 200.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Report archived"},"404":{"description":"Report not found"}},"tags":["Merged Reports Admin"],"security":[{"admin-service-token":[]}]}},"/v1/merged/admin/analyses/reports/{id}/refresh":{"post":{"operationId":"MergedAnalysesRefreshController_refreshOne","summary":"Replay the analyses stage of one finished report","description":"Rebuilds recommendations and synthesis from the answers ALREADY STORED; the other stored sections are kept as they are. Does not regenerate answers and does not create a new report, so it costs a handful of LLM calls instead of a full run. Rejects reports that are not \"done\".","parameters":[{"name":"id","required":true,"in":"path","description":"MergedReport id","schema":{"type":"string"}}],"responses":{"201":{"description":"Analyses rebuilt; returns before/after reco counts"}},"tags":["Merged Reports — Admin"],"security":[{"admin-service-token":[]}]}},"/v1/merged/admin/analyses/backfill":{"post":{"operationId":"MergedAnalysesRefreshController_backfill","summary":"Replay analyses across every report on a stale prompt version","description":"Selects finished, brand-scoped reports whose recoPromptVersion is behind the current one and refreshes them sequentially. A failing report is logged and skipped, never aborting the cohort.","parameters":[],"responses":{"201":{"description":"Returns scanned/refreshed counts and per-report failures"}},"tags":["Merged Reports — Admin"],"security":[{"admin-service-token":[]}]}},"/v1/analysis-suggestions/validate-questions":{"post":{"operationId":"SuggestionsController_validateQuestions","summary":"Validate questions against brand leakage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateQuestionsDto"}}}},"responses":{"201":{"description":""}},"tags":["Analysis suggestions"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/analysis-suggestions/suggest-competitors":{"post":{"operationId":"SuggestionsController_suggest","summary":"Suggest competitors for a brand/indication","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestCompetitorsDto"}}}},"responses":{"201":{"description":""}},"tags":["Analysis suggestions"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/analysis-suggestions/suggest-trending-questions":{"post":{"operationId":"SuggestionsController_suggestTrendingQuestions","summary":"Suggest trending questions for a topic","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestTrendingDto"}}}},"responses":{"201":{"description":""}},"tags":["Analysis suggestions"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/plans":{"get":{"operationId":"BillingController_getPlanCatalog","summary":"Public plan catalog (limits + pricing for all plans)","description":"Single source for the pricing page — derived from the same plan-limits as backend enforcement, so the grid can never drift. No auth required.","parameters":[],"responses":{"200":{"description":"All plans with display-ready limits and pricing."}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/checkout/subscription":{"post":{"operationId":"BillingController_createSubscriptionCheckout","summary":"Create a Stripe Checkout session for a plan subscription","description":"Redirect the user to the returned `url`. The webhook finalises the plan and credits.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionCheckoutDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}}}},"400":{"description":"Invalid plan / cycle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/pay-as-you-go":{"post":{"operationId":"BillingController_setPayAsYouGo","summary":"Enable/disable pay-as-you-go overage (opt-in)","description":"When enabled, usage beyond the plan's included credits is billed per credit at period end.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPayAsYouGoDto"}}}},"responses":{"200":{"description":"New pay-as-you-go state"},"400":{"description":"No active paid subscription / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/portal":{"post":{"operationId":"BillingController_createPortalSession","summary":"Create a Stripe Customer Portal session","description":"Returns a hosted URL where the user manages subscription, payment method and invoices.","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponseDto"}}}},"400":{"description":"No Stripe customer yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/balance":{"get":{"operationId":"BillingController_getBalance","summary":"Current credit balance (subscription + pack)","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/subscription":{"get":{"operationId":"BillingController_getSubscription","summary":"Subscription summary (plan, cycle, status, next renewal)","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionSummaryResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/estimate":{"get":{"operationId":"BillingController_estimate","summary":"Estimate the credit cost of a merged report run","parameters":[{"name":"questions","required":true,"in":"query","description":"Total custom questions in the run","schema":{"minimum":1,"example":6,"type":"number"}},{"name":"languages","required":true,"in":"query","description":"Number of languages / markets","schema":{"minimum":1,"example":2,"type":"number"}},{"name":"llms","required":false,"in":"query","description":"Comma-separated LLM names (cost is weighted per LLM). Falls back to a flat weight if omitted.","schema":{"example":"OpenAI,Claude","type":"string"}},{"name":"competitors","required":false,"in":"query","description":"Number of competitors tracked","schema":{"minimum":0,"example":2,"type":"number"}},{"name":"markets","required":false,"in":"query","description":"Number of regional markets","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"brand","required":false,"in":"query","description":"Brand name — its presence unlocks the analyses stages (bigger cost)","schema":{"example":"Dupixent","type":"string"}},{"name":"ownedDomains","required":false,"in":"query","description":"Number of owned domains","schema":{"minimum":0,"example":2,"type":"number"}},{"name":"personas","required":false,"in":"query","description":"Distinct personas activated","schema":{"minimum":0,"example":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateCostResponseDto"}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/billing/invoices":{"get":{"operationId":"BillingController_getInvoices","summary":"Billing history (invoices) for the account","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceResponseDto"}}}}}},"tags":["Billing"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/users/me":{"get":{"operationId":"UsersController_getMyProfile","summary":"Get current user profile","parameters":[],"responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"User profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Users"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"UsersController_deleteMyAccount","summary":"Delete the current user account (irreversible)","parameters":[],"responses":{"200":{"description":"Account deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Users"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/users/report-defaults":{"get":{"operationId":"UsersController_getReportDefaults","summary":"Profile-level report defaults (brands / therapeutic areas / owned domains)","parameters":[],"responses":{"200":{"description":"Current defaults (empty lists when unset)"}},"tags":["Users"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"put":{"operationId":"UsersController_updateReportDefaults","summary":"Replace the profile-level report defaults","description":"Lists are trimmed, deduped (case-insensitive) and capped at 20 items. Omitted fields are cleared — send the full object — except the recommendation settings (ownedAccounts, unbrandedMarkets), which are kept when omitted. To change a few fields, use PATCH.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportDefaultsDto"}}}},"responses":{"200":{"description":"Normalized saved defaults"}},"tags":["Users"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"UsersController_patchReportDefaults","summary":"Update some profile-level report defaults","description":"Only the fields sent change; the others keep their value. Works with an API key or a signed-in session. Typical use: declare the accounts the company controls on third-party platforms (ownedAccounts) and the unbranded policy per product (unbrandedMarkets), both read by the recommendation standard from the next run. Send an empty list or object to clear a field.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportDefaultsDto"}}}},"responses":{"200":{"description":"Normalized saved defaults"},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Users"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/public/index/therapeutic-areas":{"get":{"operationId":"PublicIndexController_getTherapeuticAreas","summary":"List therapeutic areas available for the public index","description":"Returns pathologies (and markets) from the dedicated index account that have at least one generated report. No authentication required.","parameters":[],"responses":{"200":{"description":"List of therapeutic areas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapeuticAreasResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Public Index"]}},"/v1/public/index/evolution":{"get":{"operationId":"PublicIndexController_getEvolution","summary":"Get SOV/AR evolution for a therapeutic area","description":"Returns the same structure as GET /agnostic/recurring/evolution/:id for the index area matching pathology (and optional market). Optional language filter for per-language metrics.","parameters":[{"name":"pathology","required":true,"in":"query","description":"Pathology (therapeutic area)","schema":{"type":"string"}},{"name":"market","required":false,"in":"query","description":"⚠️ Libellé libre hérité ('Global', 'France'), PAS le code marché régional. Le routage régional se filtre avec `market=us|eu` sur les endpoints de contenu ; ici la valeur fait partie de l'identité de l'aire thérapeutique.","schema":{"type":"string"}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter metrics to these LLMs. Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter metrics to these languages. Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Evolution data (pathology, market, evolution[] with products SOV/AR). Same shape as `GET /agnostic/recurring/evolution/:id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticEvolutionResponseDto"}}}},"400":{"description":"pathology is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Therapeutic area not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Public Index"]}},"/v1/public/index/sources":{"get":{"operationId":"PublicIndexController_getSources","summary":"Get top sources for a report (public index)","description":"Returns aggregated sources from the report content (answers), filtered by optional language and LLM. Report must belong to the index account.","parameters":[{"name":"reportId","required":true,"in":"query","description":"Agnostic report ID (e.g. from evolution[].reportId)","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit (market, language) pairs, comma-separated: `us:en,eu:fr`. Use it when a language is produced by more than one market and you want a different language per market — `market` + `language` can only express the rectangular product, which would also return us:fr and eu:en. Markets follow the same closed enumeration as `market`; a malformed pair returns 400. Mutually exclusive with `market`: combining them would leave the caller guessing whether the two are intersected or unioned.","schema":{}},{"name":"market","required":false,"in":"query","description":"Regional market codes as tagged on the generated data. Closed enumeration ('us', 'eu'): an unknown code returns 400 rather than an empty result, so a typo stays distinguishable from a market that legitimately has no data yet. Accepts several values — `market=us,eu` or `market=us&market=eu` — combined with OR. Combined with `language`, the two dimensions are independent: `market=us,eu&language=en,fr` keeps the FOUR combinations. To name the pairs one by one (English in the US, French in Europe, without us:fr nor eu:en), use `marketScope` instead. Les rapports antérieurs au routage régional ne portent de marché qu'une fois le backfill passé — sans lui, ce filtre les exclut tous.","schema":{}},{"name":"llm","required":false,"in":"query","explode":false,"style":"form","description":"Filter by LLM. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Names are matched case-insensitively against their canonical form (`openai` → `OpenAI`). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result — never another LLM's data. The summary endpoint echoes such values back under `filters.ignored.llm`. Example: `OpenAI,Claude`.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","explode":false,"style":"form","description":"Filter by language code. Comma-separated list with OR semantics: the response is the union of what each value would return on its own, deduplicated. The repeated-key form (`?p=a&p=b`) is equivalent. Codes are matched exactly (lowercase ISO codes as stored in the report). A value not present in this report matches nothing: next to other values it is simply ignored (union), alone it returns an empty result. The summary endpoint echoes such values back under `filters.ignored.language`. Example: `de,fr`.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"List of sources with ranking (times used) and reliability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicIndexSourcesResponseDto"}}}},"400":{"description":"reportId is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Public Index"]}},"/v1/llm/private-keys":{"get":{"operationId":"PrivateLlmKeysController_list","summary":"List the private LLM keys of the account (masked)","description":"Never returns a plaintext key nor its ciphertext — only the last 4 characters and metadata.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PrivateLlmKeyResponseDto"}}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Private LLM Keys"],"security":[{"JWT-auth":[]}]}},"/v1/llm/private-keys/{provider}":{"put":{"operationId":"PrivateLlmKeysController_upsert","summary":"Register or replace the private key of a provider","description":"The key is validated against the provider BEFORE being stored: a refusal (400) or an unreachable provider (502) leaves the previously stored key untouched.","parameters":[{"name":"provider","required":true,"in":"path","description":"Case-sensitive: OpenAI | Perplexity | Anthropic | Gemini | Mistral | Grok. \"Claude\" is accepted as an alias and stored as \"Anthropic\".","schema":{"example":"Anthropic","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertPrivateLlmKeyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateLlmKeyResponseDto"}}}},"400":{"description":"Invalid data or key rejected by the provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"502":{"description":"Provider unreachable — nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"BYOK encryption is not configured on this instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Private LLM Keys"],"security":[{"JWT-auth":[]}]},"delete":{"operationId":"PrivateLlmKeysController_revoke","summary":"Revoke the private key of a provider","description":"Cryptographic erasure in place: the row is kept as a tombstone (who/when) but the ciphertext, last4 and fingerprint are wiped.","parameters":[{"name":"provider","required":true,"in":"path","schema":{"example":"Anthropic","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateLlmKeyRevokedResponseDto"}}}},"400":{"description":"Unknown provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No key stored for this provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Private LLM Keys"],"security":[{"JWT-auth":[]}]}},"/v1/llm/private-keys/{provider}/test":{"post":{"operationId":"PrivateLlmKeysController_test","summary":"Re-validate the key ALREADY stored for a provider","description":"Takes no body: the key is read from the database and decrypted server-side for the duration of the call only.","parameters":[{"name":"provider","required":true,"in":"path","schema":{"example":"Anthropic","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateLlmKeyTestResponseDto"}}}},"400":{"description":"Unknown provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No key stored for this provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"502":{"description":"Provider unreachable — verdict unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"BYOK encryption is not configured on this instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Private LLM Keys"],"security":[{"JWT-auth":[]}]}},"/stripe/checkout-session/{sessionId}":{"get":{"operationId":"StripeController_getCheckoutSession","summary":"Retrieve Stripe checkout session summary","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Stripe Checkout Session id","schema":{"type":"string"}}],"responses":{"200":{"description":"Session summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionSummaryDto"}}}},"404":{"description":"Session not found in Stripe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Stripe"]}},"/stripe/payment-status/{sessionId}":{"get":{"operationId":"StripeController_getPaymentStatus","summary":"Payment status for a checkout session","description":"Returns `success=true` when the session is `complete` and `payment_status=paid`. On Stripe error returns 200 with `success=false` and an `error` message (no HTTP error).","parameters":[{"name":"sessionId","required":true,"in":"path","description":"Stripe Checkout Session id","schema":{"type":"string"}}],"responses":{"200":{"description":"Paid / unpaid status and session summary when available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusResponseDto"}}}}},"tags":["Stripe"]}},"/v1/brands/reports/{id}/recommendation-states":{"get":{"operationId":"BrandRecommendationStateController_list","summary":"Team workflow state of the recommendations: status, favorite, dismissal","description":"Join on `recommendationKey` with the recommendations routes. Never cached. State is shared by everyone on the account: it follows a recommendation that carries a standard across the runs of its series, and stays on its report run otherwise. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID or recurring series ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyRecommendationStateListDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Brand report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/brands/reports/{id}/recommendations/{recommendationKey}/state":{"patch":{"operationId":"BrandRecommendationStateController_update","summary":"Set the status, favorite flag or dismissal of one recommendation","description":"Partial update: only the fields sent are changed. To hide a non-actionable recommendation, send `dismissReason` (and optionally `dismissNote`); its status becomes `ignored`. Only accepted once the report is done. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","description":"Brand report ID or recurring series ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","description":"`recommendationKey` from the recommendations routes","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLegacyRecommendationStateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyRecommendationStateResponseDto"}}}},"400":{"description":"Empty or inconsistent body, or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report or recommendation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Report not done yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Brand Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/recommendation-states":{"get":{"operationId":"AgnosticRecommendationStateController_list","summary":"Team workflow state of the recommendations: status, favorite, dismissal","description":"Join on `recommendationKey` with the recommendations routes. Never cached. State is shared by everyone on the account: it follows a recommendation that carries a standard across the runs of its series, and stays on its report run otherwise. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID or recurring series ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyRecommendationStateListDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Agnostic report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/agnostic/reports/{id}/recommendations/{recommendationKey}/state":{"patch":{"operationId":"AgnosticRecommendationStateController_update","summary":"Set the status, favorite flag or dismissal of one recommendation","description":"Partial update: only the fields sent are changed. To hide a non-actionable recommendation, send `dismissReason` (and optionally `dismissNote`); its status becomes `ignored`. Only accepted once the report is done. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1.","parameters":[{"name":"id","required":true,"in":"path","description":"Agnostic report ID or recurring series ID","schema":{"type":"string"}},{"name":"recommendationKey","required":true,"in":"path","description":"`recommendationKey` from the recommendations routes","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLegacyRecommendationStateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyRecommendationStateResponseDto"}}}},"400":{"description":"Empty or inconsistent body, or invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Report or recommendation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Report not done yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Agnostic Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/reco-market-rules/series":{"get":{"operationId":"RecoMarketRulesController_series","summary":"Report series of the account, to copy recommendation rules from one to another","parameters":[],"responses":{"200":{"description":""}},"tags":["Recommendation rules"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/reco-market-rules/{kind}/{seriesId}":{"get":{"operationId":"RecoMarketRulesController_view","summary":"Recommendation rules of a report series, market by market","description":"Each cell gives the state applied to one action kind in one market (show, flag = shown with a regulatory note, hide), the default of the regulatory reference, and whether the client changed it. The client choice itself is a boolean: show or hide.","parameters":[{"name":"kind","required":true,"in":"path","schema":{"enum":["brand","agnostic","merged"],"type":"string"}},{"name":"seriesId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"404":{"description":"Series not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Recommendation rules"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"put":{"operationId":"RecoMarketRulesController_update","summary":"Replace the recommendation rules of a report series (account admins)","description":"Applies at once to the recommendations shown for existing runs (hidden cells), and to the next generation (prompt and filter). Every change is recorded with its author.","parameters":[{"name":"kind","required":true,"in":"path","schema":{"enum":["brand","agnostic","merged"],"type":"string"}},{"name":"seriesId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecoMarketRulesDto"}}}},"responses":{"400":{"description":"Unknown market, action kind or state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Not an account admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Recommendation rules"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/reco-market-rules/{kind}/{seriesId}/copy":{"post":{"operationId":"RecoMarketRulesController_copy","summary":"Copy the recommendation rules of another series of the account (account admins)","parameters":[{"name":"kind","required":true,"in":"path","schema":{"enum":["brand","agnostic","merged"],"type":"string"}},{"name":"seriesId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyRecoMarketRulesDto"}}}},"responses":{"403":{"description":"Not an account admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"Series not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["Recommendation rules"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/agent/chat":{"post":{"operationId":"MergedAgentController_chat","summary":"Conversational agent that builds and launches a merged report","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChatDto"}}}},"responses":{"201":{"description":"Assistant turn + updated draft config"}},"tags":["Merged Reports - Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/agent/conversations":{"get":{"operationId":"MergedAgentConversationsController_list","summary":"List saved agent/copilot conversations — most recent first, cursor-paginated","parameters":[{"name":"kind","required":false,"in":"query","schema":{"enum":["agent","copilot"],"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Merged Reports - Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/agent/conversations/{id}":{"get":{"operationId":"MergedAgentConversationsController_getOne","summary":"One conversation with its full message history","parameters":[{"name":"id","required":true,"in":"path","description":"Conversation id","schema":{"type":"string"}}],"responses":{"404":{"description":"Conversation not found (or not owned)"}},"tags":["Merged Reports - Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"MergedAgentConversationsController_remove","summary":"Archive (soft-delete) a conversation","parameters":[{"name":"id","required":true,"in":"path","description":"Conversation id","schema":{"type":"string"}}],"responses":{"204":{"description":"Conversation archived"},"404":{"description":"Conversation not found (or not owned)"}},"tags":["Merged Reports - Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/merged/reports/{id}/agent/chat":{"post":{"operationId":"MergedReportCopilotController_chat","summary":"Analysis copilot over an existing merged report (SSE token stream)","description":"Streams text/event-stream. Events: `tool` { name } (0..n, as the copilot gathers data), then `token` { delta } for progressive tokens, then a single terminal `done` { reply, usedTools }, or `error` { message } on failure.","parameters":[{"name":"id","required":true,"in":"path","description":"Merged report id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCopilotChatDto"}}}},"responses":{"201":{"description":"SSE stream of copilot events"}},"tags":["Merged Reports - Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/costs/estimate":{"get":{"operationId":"ReportCostController_estimate","summary":"Estimate the real cost of a merged / agnostic / brand report run","description":"Returns a slight over-estimate of LLM spend in USD and credit units. Actual cost is metered into the report after the run completes.","parameters":[{"name":"kind","required":true,"in":"query","description":"Report family — tunes utility/analysis call estimates","schema":{"example":"merged","enum":["merged","agnostic","brand"],"type":"string"}},{"name":"questions","required":true,"in":"query","description":"Total custom questions in the run","schema":{"minimum":1,"example":6,"type":"number"}},{"name":"languages","required":true,"in":"query","description":"Number of languages","schema":{"minimum":1,"example":2,"type":"number"}},{"name":"llms","required":false,"in":"query","description":"Comma-separated LLM names (cost is weighted per LLM). Falls back to a flat weight if omitted.","schema":{"example":"OpenAI,Claude","type":"string"}},{"name":"competitors","required":false,"in":"query","description":"Number of competitors tracked","schema":{"minimum":0,"example":2,"type":"number"}},{"name":"markets","required":false,"in":"query","description":"Number of regional markets","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"brand","required":false,"in":"query","description":"Brand / target — unlocks analysis stages","schema":{"example":"Dupixent","type":"string"}},{"name":"ownedDomains","required":false,"in":"query","description":"Number of owned domains","schema":{"minimum":0,"example":2,"type":"number"}},{"name":"personas","required":false,"in":"query","description":"Distinct personas activated","schema":{"minimum":0,"example":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateCostResponseDto"}}}}},"tags":["Costs"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/reports/admin/queue":{"get":{"operationId":"ReportJobQueueController_queue","summary":"Report generation queue (service-token guarded)","description":"Jobs by status, kind and report type (active jobs and the last 24 h), age of the oldest queued job, running jobs with their last worker heartbeat, account and estimated answers, and the next queued jobs with why each one waits (account cap reached, heavy slot taken).","parameters":[],"responses":{"200":{"description":""}},"tags":["Reports Admin"],"security":[{"admin-service-token":[]}]}},"/v1/reports/admin/{type}/{id}/resume":{"post":{"operationId":"ReportResumeController_resume","summary":"Resume one interrupted or degraded report (service-token guarded)","description":"Replays the report from its ReportChunk journal: already-generated combos are reused, only the missing ones regenerate. Same report id, no re-billing. Returns immediately — generation continues in the background.","parameters":[{"name":"type","required":true,"in":"path","schema":{"enum":["brand","agnostic","merged"],"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","description":"Bypass the attempt cap and the 7-day age limit. For a deliberate operator decision only — never used by the boot sweep."}}}}}},"responses":{"200":{"description":"Resume started, or skipped with a machine-readable reason"},"400":{"description":"Unknown report type"}},"tags":["Reports Admin"],"security":[{"admin-service-token":[]}]}},"/v1/mcp/context":{"get":{"operationId":"McpContextController_getContext","summary":"Caller context for the PharmaGeo MCP server","description":"Identity, MCP access, plan features and credit balance of the credential. Called by the MCP server with the credential its client presented.","parameters":[],"responses":{"200":{"description":""}},"tags":["MCP"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/mcp/workspaces":{"get":{"operationId":"McpContextController_getWorkspaces","summary":"Workspaces the MCP caller can use","description":"For an AI assistant connected with OAuth: the workspaces chosen when it was connected where the person is still a member. For an API key: the workspace of the key.","parameters":[],"responses":{"200":{"description":""}},"tags":["MCP"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v1/oauth/interactions/{uid}":{"get":{"operationId":"OAuthController_interaction","summary":"Authorization request awaiting the user consent (AI assistant, scopes, account)","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["OAuth (MCP)"],"security":[{"JWT-auth":[]}]}},"/v1/oauth/interactions/{uid}/decision":{"post":{"operationId":"OAuthController_decide","summary":"Record the user decision; the front then navigates to `redirectTo` (top-level) to finish the flow","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecisionDto"}}}},"responses":{"201":{"description":""}},"tags":["OAuth (MCP)"],"security":[{"JWT-auth":[]}]}},"/v1/oauth/grants":{"get":{"operationId":"OAuthController_grants","summary":"AI assistants connected to this user account","parameters":[],"responses":{"200":{"description":""}},"tags":["OAuth (MCP)"],"security":[{"JWT-auth":[]}]}},"/v1/oauth/grants/{id}":{"delete":{"operationId":"OAuthController_revoke","summary":"Disconnect an AI assistant (revokes its tokens at once)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["OAuth (MCP)"],"security":[{"JWT-auth":[]}]}},"/v2/reports/{id}/ai-summary":{"get":{"operationId":"V2AiSummaryController_aiSummary","summary":"AI summary and interpretation of the overview of a brand or agnostic report, following the filters","description":"Summary and interpretation of the overview, written by a fast AI model from the figures of the overview, competitors and sources sections computed with the SAME filters (returned in `facts`, to show side by side). Every number in the text is checked against `facts` after generation (rounding and fr/en number formats tolerated); a text that fails twice is replaced by a deterministic template text (`textSource: template`). The check guarantees that no figure outside `facts` appears in the text; it does not check which product, engine or direction a figure is attached to, so show `facts` next to the text. `caveats` holds fixed sentences on the scope (active filters, filters that do not apply to visibility). Pharmaceutical compliance: factual observations about AI answers only, no promotional or comparative claim. Cached per figures, filters, prompt version and output language: instant when cached (the unfiltered view of a finished run may be pre-generated), a few seconds the first time for a new combination of filters. Beyond ~20 s the route answers 202 `{ status: \"pending\" }` with a Retry-After header: call again. A run must be done (409 `REPORT_NOT_READY` otherwise); a series needs one done run. Enabled per account (403 `FEATURE_DISABLED` otherwise). The evolution compares a run with the previous completed run of its series (a series: its last two runs). Same text, figures, cache and account setting as /v1 brands/reports/{id}/ai-summary and agnostic/reports/{id}/ai-summary: the same filters give the same summary. Brand and agnostic reports only: merged reports and merged series have no AI summary, in /v1 as in /v2 (404 AI_SUMMARY_NOT_AVAILABLE). An agnostic report needs the agnostic detail feature of the plan (403 otherwise). The id is a report (a run) or, as in /v1, a brand or agnostic series, summarised over its reports created between from and to the way /v1 ai-summary reads a series.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id, or brand or agnostic series id read over from and to","schema":{"type":"string"}},{"name":"outputLanguage","required":false,"in":"query","description":"Language of the text (default en). The facts are language-neutral.","schema":{"enum":["en","fr"],"type":"string"}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive); a date without time includes the whole day in UTC. 400 when from is after to. Ignored on a report id, as in /v1.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id: start (inclusive) of the createdAt of the reports summarised, a date or a date-time, UTC without time zone. Ignored on a report id, as in /v1.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (us:en,eu:fr): answers of these pairs only, where market and language would also keep us:fr or eu:en. Cannot be combined with market (400); combined with language, both apply. Same countries as market. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"tags","required":false,"in":"query","description":"Questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Audiences of the questions. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer"]}}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive. A model absent from the report is echoed in filters.ignored. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase; eu is the Europe zone of older reports. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp","eu"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryResponseDto"}}}},"202":{"description":"Text still being generated: call again after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSummaryPendingResponseDto"}}}},"400":{"description":"Invalid filter or outputLanguage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"AI summary not enabled for this account, or agnostic detail not in the plan (FEATURE_DISABLED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account, or a merged report (AI_SUMMARY_NOT_AVAILABLE)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"409":{"description":"Report not done yet (REPORT_NOT_READY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/act-mode/drafts":{"get":{"operationId":"V2ActModeController_drafts","summary":"Content drafts of a report","description":"Merged, agnostic and brand reports, through the same routes; drafts are shared with /v1 Act Mode. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). Enabled by the Act Mode feature of the plan (403 otherwise), as in /v1. GET drafts/export downloads a draft as a file.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"recommendationKey","required":false,"in":"query","description":"Only the draft of this recommendation (at most one item)","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeDraftListV2Dto"}}}},"400":{"description":"Invalid recommendationKey (repeated, or longer than 500 characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Act Mode not in the plan, or agnostic detail not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"put":{"operationId":"V2ActModeController_saveDraft","summary":"Save the draft of a recommendation","description":"Creates the draft or replaces it. Merged, agnostic and brand reports, through the same routes; drafts are shared with /v1 Act Mode. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). Enabled by the Act Mode feature of the plan (403 otherwise), as in /v1. GET drafts/export downloads a draft as a file.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveActModeDraftV2Dto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeDraftV2Dto"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Act Mode not in the plan, or agnostic detail not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/act-mode/drafts/export":{"get":{"operationId":"V2ActModeController_exportDraft","summary":"Download the draft of a recommendation as a file","description":"The /v1 export of a draft (…/act-mode/drafts/export/…), served by the same code: the saved contentMarkdown, as a Markdown or plain-text attachment act-mode-{recommendationKey}.{md|txt} (| in the key becomes -). Merged, agnostic and brand reports, through the same routes; drafts are shared with /v1 Act Mode. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). Enabled by the Act Mode feature of the plan (403 otherwise), as in /v1. GET drafts/export downloads a draft as a file.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"format","required":false,"in":"query","description":"md (default, text/markdown) or txt (text/plain)","schema":{"enum":["md","txt"],"type":"string"}},{"name":"recommendationKey","required":true,"in":"query","description":"Key of the recommendation whose draft is exported","schema":{}}],"responses":{"200":{"description":"Raw text with a Content-Disposition: attachment header, not a JSON object.","content":{"text/markdown":{"schema":{"type":"string","format":"binary"}},"text/plain":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"recommendationKey missing, repeated or longer than 500 characters, or format other than md or txt","content":{"text/markdown":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}},"text/plain":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Act Mode not in the plan, or agnostic detail not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account, or no saved draft for this recommendationKey","content":{"text/markdown":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}},"text/plain":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/act-mode/chat":{"post":{"operationId":"V2ActModeController_chat","summary":"Act Mode chat: the assistant reply to the conversation","description":"One call to a language model, metered to the report as in /v1. Message contents, context and instructions are passed to the model as text only: the model has no tools and no access to other reports or accounts. Do not send personal or patient data. The reply is not saved: save it with the draft. Merged, agnostic and brand reports, through the same routes; drafts are shared with /v1 Act Mode. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). Enabled by the Act Mode feature of the plan (403 otherwise), as in /v1. GET drafts/export downloads a draft as a file.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatV2Dto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeChatReplyV2Dto"}}}},"400":{"description":"Invalid body (role other than user or assistant, too many or too long messages)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Act Mode not in the plan, or agnostic detail not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/act-mode/generate-content":{"post":{"operationId":"V2ActModeController_generateContent","summary":"Generate the content that carries out a recommendation","description":"One call to a language model, metered to the report as in /v1. Message contents, context and instructions are passed to the model as text only: the model has no tools and no access to other reports or accounts. Do not send personal or patient data. The content is a draft: it must go through your medical, legal and regulatory review (MLR/PRC) before any publication. It is not saved: save it as a draft. Merged, agnostic and brand reports, through the same routes; drafts are shared with /v1 Act Mode. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). Enabled by the Act Mode feature of the plan (403 otherwise), as in /v1. GET drafts/export downloads a draft as a file.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateActModeContentV2Dto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActModeGeneratedContentV2Dto"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Act Mode not in the plan, or agnostic detail not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Act Mode"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports":{"get":{"operationId":"V2ReportListController_list","summary":"Reports of the account, the three families together, newest first (order=asc for oldest first)","description":"Runs only (a series is reached through recurringId). Reports created inside another run are not listed. /v2 serves only the reports and series created through /v2. Those created through /v1 (brand, agnostic and merged) are not listed and their ids answer 404 (\"… is a V1 report: manage it through the /v1 routes\"): they are read and changed through /v1.","parameters":[{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"1 to 100 (default 20)","schema":{"type":"number"}},{"name":"order","required":false,"in":"query","description":"Order of createdAt: desc = newest first (default), asc = oldest first, as the /v1 order parameter.","schema":{"enum":["desc","asc"],"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): reports with questions asked in one of these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); with language, only the pairs in these languages count, pair by pair as on /answers (ch:de with language=fr matches nothing). A report created without an explicit country matches none. Comma-separated or repeated.","schema":{"type":"array","items":{}}},{"name":"market","required":false,"in":"query","description":"Reports with questions in one of these countries (two-letter codes). A report created without an explicit country matches none. Comma-separated or repeated.","schema":{"type":"array","items":{}}},{"name":"language","required":false,"in":"query","description":"Reports asked in one of these languages. Comma-separated or repeated.","schema":{"type":"array","items":{}}},{"name":"product","required":false,"in":"query","description":"Case-insensitive match on the brand or on a tracked product (the three families)","schema":{}},{"name":"brand","required":false,"in":"query","description":"Case-insensitive match on the brand (merged and brand reports)","schema":{}},{"name":"pathology","required":false,"in":"query","description":"Case-insensitive match on the pathology (merged and agnostic reports)","schema":{}},{"name":"search","required":false,"in":"query","description":"Case-insensitive match on the title","schema":{}},{"name":"recurringId","required":false,"in":"query","description":"Only the runs of this series","schema":{}},{"name":"status","required":false,"in":"query","description":"Comma-separated or repeated.","schema":{"type":"array","items":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]}}},{"name":"kind","required":false,"in":"query","description":"Comma-separated or repeated.","schema":{"type":"array","items":{"type":"string","enum":["merged","agnostic","brand"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ReportListDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"V2CreationController_createReport","summary":"Create a report (merged, agnostic or brand) from V2 questions","description":"Each question is asked in ONE country (`market`, lowercase: us ca gb fr de es it jp), from a server in that country, with the same prompt and model everywhere. `markets` creates one question per country. Without either, the account default market applies. The question is never translated: its language is the one sent, or the one detected (`en` when it cannot be told). A country without an active server is refused with 400 before anything is spent. /v1 routes are not affected. Returns at once; the report runs in the background.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateV2ReportDto"},"examples":{"merged":{"summary":"Merged report (market + brand)","value":{"kind":"merged","pathology":"Atopic dermatitis","brand":"Dupixent","llms":["OpenAI","Gemini"],"competitors":["Rinvoq"],"questions":[{"text":"Quels traitements existent pour la dermatite atopique ?","market":"fr","scope":"agnostic","category":"patient","specificLlms":["OpenAI","GoogleAIO","GoogleAIMode"]},{"text":"Which biologics treat atopic dermatitis?","markets":["us","gb"],"language":"en","scope":"agnostic","category":"professional"},{"text":"How does Dupixent compare with {COMPETITOR}?","market":"us","scope":"brand","category":"competitive","competitor":"Rinvoq"}]}},"agnostic":{"summary":"Agnostic report (brand-free)","value":{"kind":"agnostic","pathology":"Atopic dermatitis","llms":["OpenAI"],"trackedProducts":["Dupixent"],"questions":[{"text":"Quels traitements existent pour la dermatite atopique ?","market":"fr","scope":"agnostic","category":"patient","specificLlms":["OpenAI","GoogleAIO","GoogleAIMode"]},{"text":"Which biologics treat atopic dermatitis?","markets":["us","gb"],"language":"en","scope":"agnostic","category":"professional"}]}},"brand":{"summary":"Brand report","value":{"kind":"brand","brand":"Dupixent","llms":["OpenAI","Perplexity"],"indications":["Atopic dermatitis"],"questions":[{"text":"What are the side effects of Dupixent?","markets":["us","fr"],"scope":"brand","category":"patient"},{"text":"How does Dupixent compare with {COMPETITOR}?","market":"us","scope":"brand","category":"competitive","competitor":"Rinvoq"}]}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ReportCreatedDto"}}}},"400":{"description":"Invalid body, country without an active server (unavailableMarkets, availableMarkets), plan limit"},"403":{"description":"Family not included in the account, or monthly report limit reached"},"409":{"description":"The same report (same questions and countries) is running or was created in the last 24 hours"}},"tags":["V2 · Creation"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}":{"get":{"operationId":"V2ReportsController_report","summary":"A report of any family: kind, description, family extension and entity table","description":"The id is enough: merged, agnostic and brand reports are read through the same routes and objects. /v2 serves only the reports and series created through /v2. Those created through /v1 (brand, agnostic and merged) are not listed and their ids answer 404 (\"… is a V1 report: manage it through the /v1 routes\"): they are read and changed through /v1. A report of another account answers 404. An agnostic report needs the agnostic detail feature of the plan (403 otherwise), as in /v1. Ids inside extensions are V2 ids, as in the other routes: in merged, medicalRegulatory (sourceIds, answerIds, questionIds, and questionId when the finding maps to one question only) and insights[].evidence (answerIds, sourceIds, entityIds) keep the /v1 ids beside them in legacySourceIds, legacyAnswerIds, legacyQuestionId and legacyEntityIds. A /v1 id that matches nothing served is left out of the V2 list and kept in the legacy one. In brand, each extensions.brand.overview item gives the country of its block in market and its language in language (read from the /v1 marketCode and market fields). A block that recorded no country reads as eu, as the questions of such a report do: there eu stands for country not recorded and cannot be told apart from the legacy Europe zone. A language that is not a supported code reads as null, not en as for questions. market, marketScope, language, llm and category filter the lists of extensions.brand only: overview and wordCloud by country, language and model; trending by language, model and category; medicalRegulatory by language. A language is attributed to a country only when the questions of the report tagged it with that one country (as /v1 reads the word cloud): a language tagged with several countries, or never tagged (a report whose questions carry no country), belongs to none. A wordCloud block without country takes the country of its language; an overview entry without country reads as eu (see the report route), so market=eu keeps it. trending and medicalRegulatory carry no country: market keeps the languages attributed to these countries, marketScope the languages whose attributed country:language pair it asks (us:fr keeps nothing when fr is not attributed to us). A wordCloud block keeps the country it carries, while trending and medicalRegulatory only go through the attribution of their language: marketScope=us:en can keep us:en word cloud blocks and empty trending when en is shared. An empty trending or medicalRegulatory under a country filter can mean no language attributable to that country (a language shared by two countries, or questions without country) rather than no data: read them without market to tell. An overview entry is kept on its own country and language, where /v1 overview keeps every entry of the models with data in the language. On merged and agnostic reports these parameters change nothing but are still read: an unknown value answers 400, as on every /v2 route. Other fields are unchanged.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Brand reports: trending questions of these categories, a language left without question left out, as /v1. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"llm","required":false,"in":"query","description":"Brand reports: overview of these models; wordCloud weights recounted over these models (byLlm), terms they never give left out; trending in the languages these models answered in, as /v1. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Brand reports: the four lists of extensions.brand in these languages. Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"marketScope","required":false,"in":"query","description":"Brand reports: extensions.brand.overview and wordCloud of these country:language pairs (ch:de,ch:fr), trending and medicalRegulatory in the languages attributed to these pairs. Cannot be combined with market (400). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"market","required":false,"in":"query","description":"Brand reports: extensions.brand.overview and wordCloud of these countries, trending and medicalRegulatory in the languages attributed to them. Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"example":{"schemaVersion":2,"kind":"merged","meta":{"id":"example-merged","pathology":"atopic dermatitis","brand":{"name":"Dupixent","entityId":"e_W_GwV1gl0Mbklobj"},"status":"done","rawStatus":"done","createdAt":"2026-10-22T08:00:00.000Z","startedAt":"2026-10-22T08:00:00.000Z","finishedAt":"2026-10-22T08:12:40.000Z","recurringId":null,"competitors":["Rinvoq"],"trackedProducts":["Dupixent"],"trackedTerms":[{"term":"approved","variants":{"de":["zugelassen"]}},{"term":"lebrikizumab","variants":{}}],"ownedDomains":["dupixent.com"],"ownedDomainGroups":{},"sentimentEngine":"brand-sentiment-v1","markets":["de","us","gb"],"languages":["de","en"],"llms":[{"id":"OpenAI","answers":4,"failed":0,"notTriggered":0},{"id":"Gemini","answers":3,"failed":1,"notTriggered":0}]},"extensions":{"merged":{"trackedTerms":["lebrikizumab"],"competitiveSynthesis":null,"recommendationsSynthesis":null,"regulatoryWithheld":[],"medicalRegulatory":[{"id":"mr_conjunctivitis_de","severity":"warning","topic":"missing safety info","finding":{"original":"Die Antwort nennt Dupilumab ohne Hinweis auf Konjunktivitis.","en":"The answer names dupilumab without mentioning conjunctivitis."},"language":"de","llm":"OpenAI","sourceIds":["src_Extp6JFYwUbGsAjh"],"answerIds":["a_Wi3LbH7cLxm9wojf"],"questionId":"q_6u8yhKV1hxltPqrJ","questionIds":["q_6u8yhKV1hxltPqrJ"],"legacySourceIds":["https://register.awmf.org/de/leitlinien/detail/013-027"],"legacyAnswerIds":["q_k2m9x1|OpenAI|de"],"legacyQuestionId":"q_k2m9x1"}],"wordCloud":[],"trending":[],"insights":[{"id":"ins_owned_site","kind":"opportunity","scope":"brand","title":"The company site is cited by one engine only","detail":"OpenAI cites the disease page in the United States; Gemini never does.","evidence":{"answerIds":["a_fdrTewvBgPIozPtn"],"sourceIds":["src_-hQ7VW0hmtt1ejHD"],"entityIds":["e_W_GwV1gl0Mbklobj"],"legacyAnswerIds":["q_1x0pzr|OpenAI|us"],"legacySourceIds":["https://www.example-pharma.de/neurodermitis"],"legacyEntityIds":["ent_dupixent"]}}],"personas":{"ids":["persona_hcp_dermatologist"],"comparison":null},"recommendationDetails":{"rec_krankheitsinfo_de":{"actionKind":"content-update","weakArea":"owned-citation","targetMetric":"citation-share","expectedImpact":"The company page cited in German answers","regulatoryNote":null,"regulatoryNoteReview":null,"regulatoryScope":null,"marketLabel":"Germany"}}}},"entities":[{"id":"e_W_GwV1gl0Mbklobj","legacyId":"ent_dupixent","name":"Dupixent","type":"product","isBrand":true,"isCompetitor":false},{"id":"e_2SYLrADNkrAN9qOF","legacyId":"ent_rinvoq","name":"Rinvoq","type":"product","isBrand":false,"isCompetitor":true}]},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportV2Dto"},"example":{"schemaVersion":2,"kind":"merged","meta":{"id":"example-merged","pathology":"atopic dermatitis","brand":{"name":"Dupixent","entityId":"e_W_GwV1gl0Mbklobj"},"status":"done","rawStatus":"done","createdAt":"2026-10-22T08:00:00.000Z","startedAt":"2026-10-22T08:00:00.000Z","finishedAt":"2026-10-22T08:12:40.000Z","recurringId":null,"competitors":["Rinvoq"],"trackedProducts":["Dupixent"],"trackedTerms":[{"term":"approved","variants":{"de":["zugelassen"]}},{"term":"lebrikizumab","variants":{}}],"ownedDomains":["dupixent.com"],"ownedDomainGroups":{},"sentimentEngine":"brand-sentiment-v1","markets":["de","us","gb"],"languages":["de","en"],"llms":[{"id":"OpenAI","answers":4,"failed":0,"notTriggered":0},{"id":"Gemini","answers":3,"failed":1,"notTriggered":0}]},"extensions":{"merged":{"trackedTerms":["lebrikizumab"],"competitiveSynthesis":null,"recommendationsSynthesis":null,"regulatoryWithheld":[],"medicalRegulatory":[{"id":"mr_conjunctivitis_de","severity":"warning","topic":"missing safety info","finding":{"original":"Die Antwort nennt Dupilumab ohne Hinweis auf Konjunktivitis.","en":"The answer names dupilumab without mentioning conjunctivitis."},"language":"de","llm":"OpenAI","sourceIds":["src_Extp6JFYwUbGsAjh"],"answerIds":["a_Wi3LbH7cLxm9wojf"],"questionId":"q_6u8yhKV1hxltPqrJ","questionIds":["q_6u8yhKV1hxltPqrJ"],"legacySourceIds":["https://register.awmf.org/de/leitlinien/detail/013-027"],"legacyAnswerIds":["q_k2m9x1|OpenAI|de"],"legacyQuestionId":"q_k2m9x1"}],"wordCloud":[],"trending":[],"insights":[{"id":"ins_owned_site","kind":"opportunity","scope":"brand","title":"The company site is cited by one engine only","detail":"OpenAI cites the disease page in the United States; Gemini never does.","evidence":{"answerIds":["a_fdrTewvBgPIozPtn"],"sourceIds":["src_-hQ7VW0hmtt1ejHD"],"entityIds":["e_W_GwV1gl0Mbklobj"],"legacyAnswerIds":["q_1x0pzr|OpenAI|us"],"legacySourceIds":["https://www.example-pharma.de/neurodermitis"],"legacyEntityIds":["ent_dupixent"]}}],"personas":{"ids":["persona_hcp_dermatologist"],"comparison":null},"recommendationDetails":{"rec_krankheitsinfo_de":{"actionKind":"content-update","weakArea":"owned-citation","targetMetric":"citation-share","expectedImpact":"The company page cited in German answers","regulatoryNote":null,"regulatoryNoteReview":null,"regulatoryScope":null,"marketLabel":"Germany"}}}},"entities":[{"id":"e_W_GwV1gl0Mbklobj","legacyId":"ent_dupixent","name":"Dupixent","type":"product","isBrand":true,"isCompetitor":false},{"id":"e_2SYLrADNkrAN9qOF","legacyId":"ent_rinvoq","name":"Rinvoq","type":"product","isBrand":false,"isCompetitor":true}]}}}},"404":{"description":"No report or series with this id in the account, or one created through /v1 (read it through /v1)"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"V2ArchiveController_archiveReport","summary":"Delete (archive) a report of any family","description":"Same behaviour and same rights as DELETE /v1/merged/reports/:id, /v1/agnostic/reports/:id and /v1/brands/reports/:id. Nothing is erased: the data is kept but no longer listed nor readable by its id, in /v1 as in /v2. There is no route to restore it. A run in progress is not stopped and no credit is refunded, as in /v1. A second call answers 404. A run of a series can be deleted on its own; the series keeps running. Deleting a merged report does not delete the older brand or agnostic reports its run may have created; those are not listed in /v2 and need no action.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ArchivedReportDto"}}}},"403":{"description":"An agnostic report on a plan without agnostic reports"},"404":{"description":"No report with this id for this account"}},"security":[{"api-key":[]},{"JWT-auth":[]}],"tags":["V2 · Reports"]}},"/v2/reports/{id}/questions":{"get":{"operationId":"V2ReportsController_questions","summary":"Questions: one language and one country each","description":"A legacy question asked in several countries is one question per country, sharing its legacyId. The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"isProductTrigger","required":false,"in":"query","description":"Agnostic reports only: true = questions written to make a product appear, false = the others. Merged and brand questions match none.","schema":{"type":"boolean"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"llm","required":false,"in":"query","description":"Questions with at least one answer collected (status ok, any persona) from one of these models, case-insensitive, as /v1 agnostic questions; a question every model failed on matches none. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"intent","required":false,"in":"query","description":"Merged and agnostic reports: intents of the questions (case-insensitive). Brand questions carry no intent and match none. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"q","required":false,"in":"query","description":"Text search in the question, original or English text, case- and accent-insensitive","schema":{}},{"name":"tags","required":false,"in":"query","description":"Questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"questionId","required":false,"in":"query","description":"Question ids, to read given questions whatever their page. Comma-separated or repeated; values are combined with OR.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionV2PageDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/answers":{"get":{"operationId":"V2ReportsController_answers","summary":"Answers: one per question, model and persona","description":"Every question has an answer from every model of the report: an answer the model never gave is listed with status failed and an empty text. Persona answers (personaId set) come on top and are never completed that way. The persona answers of an agnostic report are not analysed for products: their mentions stay empty whatever they cite. The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"isProductTrigger","required":false,"in":"query","description":"Answers to these questions. Agnostic reports only: true = questions written to make a product appear, false = the others. Merged and brand questions match none.","schema":{"type":"boolean"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"q","required":false,"in":"query","description":"Answers to the questions whose original or English text contains this text, case- and accent-insensitive (as /v1 and /questions)","schema":{}},{"name":"intent","required":false,"in":"query","description":"Answers to questions of these intents. Merged and agnostic reports: intents of the questions (case-insensitive). Brand questions carry no intent and match none. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"sentiment","required":false,"in":"query","description":"Collected answers with this sentiment; unscored = collected without a sentiment. Failed and not_triggered answers match none. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["positive","neutral","negative","unscored"]}}},{"name":"personaId","required":false,"in":"query","description":"Persona ids; none = answers without persona. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"V2 question ids. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive; an unknown one answers 400. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"tags","required":false,"in":"query","description":"Answers to questions with at least one of these tags. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerV2PageDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations":{"get":{"operationId":"V2ReportsController_recommendations","summary":"Recommendations of the three families in one list","description":"A recommendation without market or language applies to the whole report and is kept under market and language filters. Ids are the ones statuses and reruns already use. The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"priorityScore: highest score first (the /v1 sort for brand and agnostic). priority: high first, then medium, low and without priority. standard: priority of the recommendation standard, ties to lower effort then higher impact; unranked last. Ties keep the default order; keep the same value across pages of a cursor.","schema":{"enum":["priorityScore","priority","standard"],"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"tags","required":false,"in":"query","description":"Prompt tags, case-insensitive. A recommendation carries the tags of the questions whose answers justify it: the answers it points to, and those citing one of its sources in its market, language and model (`tags` on each item). A recommendation without such answers has no tag and matches no tag. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"audience","required":false,"in":"query","description":"Audiences, case-insensitive (professional = hcp). The audience set by the recommendation standard when there is one, otherwise those of the questions whose answers justify the recommendation (`audiences` on each item). A recommendation tied to no audience applies to every audience and is kept. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"quadrant","required":false,"in":"query","description":"Impact × effort quadrant; later is usually hidden. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","description":"Priority tier of the standard (at most 3 high per owner, market and language). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","description":"Primary owner. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","deprecated":true,"description":"Deprecated name of standardCategory on this route, still accepted: elsewhere category is the question category (patient, professional…). Sending both answers 400.","schema":{"type":"array","items":{"type":"string","enum":["technical-foundation","owned-content","earned-reference","community-ugc"]}}},{"name":"standardCategory","required":false,"in":"query","description":"Category of the recommendation standard (where the action happens), not a question category. A recommendation without standard matches none of the standard filters. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["technical-foundation","owned-content","earned-reference","community-ugc"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive; an unknown one answers 400. A recommendation without model applies to all and is kept. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"priority","required":false,"in":"query","description":"A recommendation without priority matches none. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR. As in /v1, a recommendation without country or without language matches no pair.","schema":{}},{"name":"kind","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationV2PageDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/sources":{"get":{"operationId":"V2ReportsController_sources","summary":"Sources cited by the answers, deduplicated by normalised url","description":"Sorted by citations, most cited first. Without market, language, llm, scope, category or tags, each source carries its counts over the whole report. With any of them (or marketScope), counts are recomputed over the answers matching all of them, sources they never cite are left out and unattributed counts are omitted. The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"owned","required":false,"in":"query","description":"true = only sources on a domain the client owns","schema":{"type":"boolean"}},{"name":"domain","required":false,"in":"query","description":"A domain and its subdomains (nice.org.uk)","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"type","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["regulatory","guideline","hta","pubmed","cochrane","clinical_trials","society","manufacturer","knowledge_base","news","other"]}}},{"name":"tags","required":false,"in":"query","description":"Counts over the answers to questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Counts over the answers of these categories. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Counts over the answers of these scopes. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive; an unknown one answers 400. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceV2PageDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/metrics":{"get":{"operationId":"V2ReportsController_metrics","summary":"Figures of a report of any family, in one format: rates carry their numerator and denominator","description":"Computed from the answers of the report, filtered first, with the precomputed slices of the filtered answers. A rate over no answer has a null value: no data is never shown as zero, and a missing slice is never replaced by the overall figures. A single marketScope pair is echoed in filter as market and language (same answers). The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading. The figures are then computed over the answers of all these reports.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"personaId","required":false,"in":"query","description":"One persona id: the figures of the answers of that persona only, over the questions it was given. Absent or none = the answers without persona. Merged reports: 404 when the finished report has no answer of it, empty figures while it runs. Brand reports: persona answers are added a few minutes after the report finishes, empty figures until then. Agnostic reports: 400, their persona answers carry no product mention; read them with /answers?personaId=. To compare with the answers without persona, send the same questionId to both calls. Google AI Overviews and AI Mode are never asked for a persona. extensions.merged.personas.comparison keeps the /v1 formula over all the questions: its figures differ from these.","schema":{}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"Only the answers to these V2 questions (an id stays the same from one run of a series to the next while the question is not edited). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"tags","required":false,"in":"query","description":"Only the answers to questions with at least one of these tags (case-insensitive). Not a slice dimension. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive; an unknown one answers 400. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportMetricsV2ResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/personas":{"get":{"operationId":"V2ReportsController_personas","summary":"Personas of a report of any family, with their number of collected answers","description":"Their answers are read with /answers?personaId=. Each persona is asked only the questions it was given, never by Google AI Overviews or AI Mode, and never the competitive questions of a brand report. Brand and agnostic reports: the persona answers are added a few minutes after the report finishes; a persona that produced no answer is not listed. Merged reports: every persona of the run is listed, with the attributes frozen at launch.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPersonaV2ListDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/sources/summary":{"get":{"operationId":"V2ReportsController_sourcesSummary","summary":"Citation summary: types, domains, per model, top URLs, owned share","description":"Same content as the /v1 summaries, for the three families, counted over the answers collected (one citation = one source cited by one answer). Owned = a domain the report marks as owned. Citations an older report recorded without their answer are added only without filters. The id can also be a series id: the reports of the series created between from and to are then read together, as /v1 does for a series id. Answers get the id reportId:id and carry reportId (their legacyId repeats once per report); recommendations are those of the last report of the period that has some (the last report for brand), with their own ids and reportId; period lists the reports read and those left out. A series id gets no early 304: its ETag is computed after reading.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"domainLimit","required":false,"in":"query","description":"Length of domains (default 100, max 10000)","schema":{"type":"number"}},{"name":"llmDomainLimit","required":false,"in":"query","description":"Domains per model (default 10, max 1000)","schema":{"type":"number"}},{"name":"urlLimit","required":false,"in":"query","description":"Length of topUrls (default 100, max 10000)","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC, whatever its format; a date-time without time zone is read in UTC; series runs start at 22:00 UTC. As in /v1, the done reports of the period are read as one; when none is done, every report of the period is read and period.fallback is true. At most 24 (400 otherwise). period.reports and period.excluded give each report with its status and createdAt. Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together. A date, a date-time or any date /v1 reads (Oct 30 2026, 10/30/2026…), between 1970 and 9999, in UTC when it has no time zone. On a report id it is ignored, even when it cannot be read, as /v1 does: the content of a report does not depend on dates.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"tags","required":false,"in":"query","description":"Only the answers to questions with at least one of these tags (case-insensitive). Not a slice dimension. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive; an unknown one answers 400. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports, which may also hold countries no longer offered (hk, sa). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SourcesSummaryResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations/states":{"get":{"operationId":"V2RecommendationStatesController_list","summary":"Team state of the recommendations, kept across the runs of a series","description":"Never cached. Join on id with /v2/reports/:id/recommendations: every recommendation has an entry. A recommendation without standard has tier null and keeps its state on this run only. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1. Exception to the /v2 rule: this route also serves the reports created through /v1, which the PharmaGeo app reads here.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationStateListV2Dto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations/{recommendationId}/state":{"patch":{"operationId":"V2RecommendationStatesController_update","summary":"Set the status, favorite or dismissal of a recommendation for the whole series","description":"The state follows the stable id of the recommendation: a recommendation done or dismissed does not come back as to do in the next run. Only accepted once the report is done. Accepted for recommendations without standard too (state kept on this run). One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1. Exception to the /v2 rule: this route also serves the reports created through /v1, which the PharmaGeo app reads here.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run)","schema":{"type":"string"}},{"name":"recommendationId","required":true,"in":"path","description":"id or standard.stableId of the recommendation","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecommendationStateV2Dto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationStateUpdateV2Dto"}}}},"400":{"description":"No field given, an unknown value, or a dismissal on a status other than dismissed"},"404":{"description":"No report with this id for this account, or no recommendation with this id in it"},"409":{"description":"The report is not done yet"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/series/{id}/recommendations/impact":{"get":{"operationId":"V2RecommendationStatesController_impact","summary":"Impact tracking of the recommendations marked done","description":"For each done recommendation, including those marked published in the V1 routes or the app: share of answers showing the gap when it was marked done, then at the first run 4 and 8 weeks later (change > 0 = the gap shrank). Recommendations without standard (stableId starting with run_) cannot be measured and are not listed; their done state is in /v2/reports/:id/recommendations/states. Never cached.","parameters":[{"name":"id","required":true,"in":"path","description":"Series id","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationImpactListV2Dto"}}}},"403":{"description":"Agnostic series: the plan does not include the agnostic detail"},"404":{"description":"No series with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/market-analyses":{"get":{"operationId":"V2MarketAnalysesController_marketAnalyses","summary":"Competitive and recommendation syntheses per country and language","description":"Merged reports run per country and language: one item per pair, as /v1 analyses.byMarketLanguage, with countries and languages in the /v2 format. linkedRecommendationIds are ids of /v2/reports/{id}/recommendations; the promotional status of an action (standard, blocked markets) is read on these linked recommendations, and cannot be read when an action has none left. An empty list means that no analysis per country is available for this report or these filters, never that there is nothing to report: a merged report generated before analyses per country existed, a country or language the report did not run, and agnostic and brand reports, which have none. A pair with unavailable true had no answer collected. A pair with unavailable false and a null recommendationsSynthesis had answers but its synthesis could not be produced. competitive lists every competitor of the report, at a share of voice of 0 when no answer mentions it. The same items, unfiltered, are in extensions.merged.byMarketLanguage of /v2/reports/{id} (key absent when the report has no analysis per country), next to the overall syntheses.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketAnalysesV2ResponseDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/entities":{"get":{"operationId":"V2EntitiesController_entities","summary":"Entities of a report of any family, with their figures over the answers filtered","description":"The entity table of the report with, for each entity, the answers naming it and the appearance and shareOfVoice of /metrics for the same filters. answers counts both scopes (brand questions included); appearance and shareOfVoice, like /metrics, count only brand-free answers (scope agnostic), given apart as brandFreeAnswers. Without market, language, llm, scope, category, tags or questionId, every entity is listed. With any of them, entities no answer of the perimeter names are left out, except the brand and its competitors, always listed. Sorted by answers, most named first. shareOfVoice counts answers, as /v2 metrics and /v1 merged entities do. On agnostic reports, weightedShareOfVoice is the share of /v1 agnostic metrics/products, which weights each answer by the authority of its sources and the confidence of the detection; minShareOfVoice applies to shareOfVoice. A brand report measures the brand only: its competitors show answers 0, an empty byLlm and no mentions because they are not measured, not because no model names them (their questions are /questions?category=competitive). Replaces /v1 merged entities, agnostic metrics/products, agnostic tracked-products (type=product) and brand competitors (isCompetitor=true).","parameters":[{"name":"id","required":true,"in":"path","description":"Report id, or series id read over from and to","schema":{"type":"string"}},{"name":"isBrand","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"isCompetitor","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"minAppearanceRate","required":false,"in":"query","description":"Ratio 0 to 1. Keeps the entities whose appearance reaches it; an entity without appearance is left out.","schema":{"type":"number"}},{"name":"minShareOfVoice","required":false,"in":"query","description":"Ratio 0 to 1. Keeps the entities whose shareOfVoice reaches it; an entity without shareOfVoice is left out.","schema":{"type":"number"}},{"name":"q","required":false,"in":"query","description":"Text search in the entity name, case- and accent-insensitive","schema":{}},{"name":"type","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["product","organization","condition","other"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"tags","required":false,"in":"query","description":"Answers to questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"Answers to these V2 questions. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only the answers of these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together, as on /answers. Ignored on a report id.","schema":{}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC. As on /answers, the done reports of the period are read as one (every report when none is done, period.fallback true), at most 24 (400 otherwise). Ignored on a report id.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityStatsV2PageDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/entities/co-mentions":{"get":{"operationId":"V2EntitiesController_coMentions","summary":"Pairs of entities named in the same answer","description":"One item per pair of entities named together by at least one answer collected (status ok, without persona) of the perimeter, both scopes: filter scope=agnostic for brand-free answers. Sorted by answers, most frequent first. Replaces /v1 agnostic metrics/co-mentions.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id, or series id read over from and to","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"entityType","required":false,"in":"query","description":"Pairs whose two entities are of these types; with entityId, the other entity of the pair. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["product","organization","condition","other"]}}},{"name":"entityId","required":false,"in":"query","description":"Pairs that include one of these entities (V2 id or the /v1 legacyId). 404 when none of them is an entity of the report. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"tags","required":false,"in":"query","description":"Answers to questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"Answers to these V2 questions. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only the answers of these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together, as on /answers. Ignored on a report id.","schema":{}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC. As on /answers, the done reports of the period are read as one (every report when none is done, period.fallback true), at most 24 (400 otherwise). Ignored on a report id.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoMentionV2PageDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/entities/{entityId}/mentions":{"get":{"operationId":"V2EntitiesController_mentions","summary":"Answers that name an entity","description":"The collected answers (status ok) of /answers whose mentions include the entity, with the same filters. Answers without persona only, as counted by answers on /entities, unless personaId is set (personaId=p1,none for a persona and the answers without persona). Replaces /v1 agnostic entity-mentions; the entities named by one answer are its mentions field.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id, or series id read over from and to","schema":{"type":"string"}},{"name":"entityId","required":true,"in":"path","description":"Entity id of /v2/reports/:id/entities, or its /v1 legacyId","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"sentiment","required":false,"in":"query","description":"Collected answers with this sentiment; unscored = collected without a sentiment. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["positive","neutral","negative","unscored"]}}},{"name":"personaId","required":false,"in":"query","description":"Persona ids; none = answers without persona. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). eu is the Europe zone of older reports. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"tags","required":false,"in":"query","description":"Answers to questions with at least one of these tags (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"Answers to these V2 questions. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only the answers of these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together, as on /answers. Ignored on a report id.","schema":{}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC. As on /answers, the done reports of the period are read as one (every report when none is done, period.fallback true), at most 24 (400 otherwise). Ignored on a report id.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerV2PageDto"}}}},"404":{"description":"No report with this id for this account, or no entity with this id in the report"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations/grouped":{"get":{"operationId":"V2RecommendationActionsController_grouped","summary":"Recommendations grouped by similarity or by a label","description":"Same filters as /v2/reports/:id/recommendations; the page counts groups. similar: near-identical actions collapsed into one group across models, with the models that proposed them (the /v1 recommendations-grouped). category, owner, review, tier, quadrant: labels of the recommendation standard; priority, kind, market, language: fields of the recommendation. Groups by label come in the order of the labels, recommendations without the label last (key null); a report none of whose recommendations carries the standard (merged reports of accounts without it) answers 400 on its labels. similar groups the whole report once and then keeps the recommendations matching the filters, so a group never depends on the filters; when the similarity service is unavailable, each recommendation is its own group and the answer carries no version ETag, so the next call groups again.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id, or series id read over from and to","schema":{"type":"string"}},{"name":"by","required":true,"in":"query","description":"similar: near-identical actions collapsed into one group across models, with the models that proposed them (the /v1 recommendations-grouped). category, owner, review, tier, quadrant: labels of the recommendation standard; priority, kind, market, language: fields of the recommendation. Groups by label come in the order of the labels, recommendations without the label last (key null); a report none of whose recommendations carries the standard (merged reports of accounts without it) answers 400 on its labels. similar groups the whole report once and then keeps the recommendations matching the filters, so a group never depends on the filters; when the similarity service is unavailable, each recommendation is its own group and the answer carries no version ETag, so the next call groups again.","schema":{"enum":["similar","category","owner","review","tier","quadrant","priority","kind","market","language"],"type":"string"}},{"name":"sort","required":false,"in":"query","description":"By label: order of the recommendations inside each group. With by=similar: the most complete recommendation kept by the filters comes first in its group, the others follow in this order, and groups are ordered on their best recommendation; without sort, larger groups first.","schema":{"enum":["priorityScore","priority","standard"],"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Groups per page, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"perGroup","required":false,"in":"query","description":"Recommendations given in each group, 1 to 200 (default 20). A larger group gives nextRecommendationCursor.","schema":{"type":"number"}},{"name":"group","required":false,"in":"query","description":"Id of one group of this grouping (same filters): only that group comes back, with nextCursor null. With groupCursor, reads the rest of a group page by page.","schema":{"type":"string"}},{"name":"groupCursor","required":false,"in":"query","description":"nextRecommendationCursor of the group named by group.","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","description":"Prompt tags, case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"audience","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["hcp","patient","payer"]}}},{"name":"quadrant","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"]}}},{"name":"tier","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"review","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["mlr","light","none"]}}},{"name":"owner","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}}},{"name":"category","required":false,"in":"query","deprecated":true,"description":"Deprecated name of standardCategory, still accepted, as on /recommendations. Sending both answers 400.","schema":{"type":"array","items":{"type":"string","enum":["technical-foundation","owned-content","earned-reference","community-ugc"]}}},{"name":"standardCategory","required":false,"in":"query","description":"Category of the recommendation standard, as on /recommendations. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["technical-foundation","owned-content","earned-reference","community-ugc"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive. With by=similar, a group is kept when one of its recommendations matches. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"priority","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["high","medium","low"]}}},{"name":"kind","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["geo","aeo","owned-domain"]}}},{"name":"language","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"to","required":false,"in":"query","description":"With a series id: end (inclusive) of the period; a date without time includes the whole day in UTC. As on /recommendations, the recommendations are those of the last report of the period that has some (the last report for brand), with their reportId; at most 24 reports (400 otherwise). Ignored on a report id.","schema":{}},{"name":"from","required":false,"in":"query","description":"With a series id instead of a report id: start (inclusive) of the createdAt of the reports read together, as on /recommendations. Ignored on a report id.","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): only these pairs, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. As on /recommendations and in /v1, a recommendation without country or without language matches no pair. Comma-separated or repeated; values are combined with OR.","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationGroupV2PageDto"}}}},"400":{"description":"Missing or unknown by, invalid filter value; RECOMMENDATION_STANDARD_NOT_AVAILABLE when by is a label of the recommendation standard (category, owner, review, tier, quadrant) and no recommendation of the report carries the standard (usableBy lists the groupings that work)"},"404":{"description":"Report not found"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations/{recommendationId}/rerun":{"post":{"operationId":"V2RecommendationActionsController_rerun","summary":"Re-run a merged report targeting one of its recommendations","description":"Creates a NEW report with the settings and questions of the source report, linked to the recommendation (as POST /v1/merged/reports/:id/recommendations/:recoKey/rerun). Same plan limits, credit check and credit charge as a report creation. A report with V2 questions is replayed with no model call before the run; an older report goes through the /v1 rerun, which classifies its questions first. Merged reports only. Returns at once with the new report id (status pending).","parameters":[{"name":"id","required":true,"in":"path","description":"Source report id (a merged run)","schema":{"type":"string"}},{"name":"recommendationId","required":true,"in":"path","description":"id or standard.stableId of the recommendation","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationRerunV2Dto"}}}},"400":{"description":"Not a merged report, plan limit, not enough credits, country without an active server"},"403":{"description":"A Google engine of the source report is no longer included in the account"},"404":{"description":"Report or recommendation not found"},"409":{"description":"A rerun of this recommendation is already pending or running (existingReportId), or being started by another call"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/export":{"get":{"operationId":"V2ExportsController_export","summary":"File export of a report: NDJSON stream or CSV file","description":"The /v1 file exports, served by the same code for the same reports and the same rights. format=ndjson streams the whole report, one JSON object per line with a type discriminator, as /v1/brands/reports/{id}/export and /v1/agnostic/reports/{id}/export: brand and agnostic reports only (an agnostic report needs the agnostic detail feature of the plan). format=csv returns one CSV file chosen by type, as /v1/agnostic/reports/export/csv/{id}: agnostic reports only, with the agnostic exports feature of the plan. Lines and columns keep the /v1 names and ids. /v1 has no file export of a merged report: on a merged report both formats answer 400 EXPORT_NOT_AVAILABLE, and its data is read through the JSON routes. The Act Mode draft of a recommendation is exported through /v2/reports/{id}/act-mode/drafts/export. The id is a report id, not a series id.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"format=csv only (400 otherwise). metrics (default): one row per language, market and product with its appearance rate and share of voice weighted by source authority (/v2 metrics weightedShareOfVoice); entities: one row per entity detected in an answer; co-mentions: one row per language, market and pair of entities cited together.","schema":{"enum":["metrics","entities","co-mentions"],"type":"string"}},{"name":"format","required":false,"in":"query","description":"Required, unless the Accept header asks for application/x-ndjson (format=ndjson then).","schema":{"enum":["ndjson","csv"],"type":"string"}}],"responses":{"200":{"description":"format=ndjson: application/x-ndjson stream, one JSON object per line. format=csv: text/csv attachment agnostic-report-{id}-{type}.csv.","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"format missing or unknown, type with format=ndjson, or EXPORT_NOT_AVAILABLE: no such export for this family","content":{"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}},"text/csv":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Brand reports, agnostic detail or agnostic exports not in the plan","content":{"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}},"text/csv":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}},"text/csv":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/answer-diff":{"get":{"operationId":"V2ReportDriftController_answerDiffEndpoint","summary":"What changed in the answers between two runs of a series","description":"Works for the three families. Answers are paired on their V2 id (question, country, language, model and persona), which stays the same from one run to the next while the question is not edited; the rest is paired on the question text when only the scope changed (match = text). Without against, the earlier run is the last run of the same series created before this one with status done or completed, the run its drift alerts compare with: an agnostic or brand run stopped as partial is skipped, a merged run that ended partial is kept; a report outside a series, or the first run, gives comparedAgainst null and no entry. Answers are compared on their text, ignoring case and accents, and on their status.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id of the run to compare (a run, not a series)","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page, with the same filters.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size, 1 to 200 (default 50).","schema":{"type":"number"}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr): entries of these pairs only, where market and language would also keep ch:it or de:fr. Cannot be combined with market (400); combined with language, both apply. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"personaId","required":false,"in":"query","description":"Persona ids; none = answers without persona (the /v1 diff only had those). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"V2 question ids, of either run. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"tags","required":false,"in":"query","description":"Entries whose question has at least one of these tags in either run (case-insensitive). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models (OpenAI,Gemini), case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Language codes (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries, lowercase or uppercase (fr,de). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}},{"name":"status","required":false,"in":"query","description":"Entries of these statuses. Does not change summary. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["changed","stable","new","dropped"]}}},{"name":"against","required":false,"in":"query","description":"Report id of the earlier run, of the same family; omit to take the previous run of the series. Neither its series nor its status is checked: an unfinished run gives failed answers","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerDiffV2ResponseDto"}}}},"400":{"description":"Invalid filter, against equal to id, or against of another family"},"404":{"description":"No report with this id (or against) for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/drift-alerts":{"get":{"operationId":"V2ReportDriftController_reportAlerts","summary":"Drift alerts raised at the end of this run, newest first","description":"Drift alerts are raised at the end of each run of a merged series. An agnostic or brand report has none.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertV2ListDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/drift-alerts/read":{"post":{"operationId":"V2ReportDriftController_markReportRead","summary":"Mark every drift alert of this run as read","description":"Drift alerts are raised at the end of each run of a merged series. An agnostic or brand report has none.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertsReadV2ResponseDto"}}}},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/drift-alerts":{"get":{"operationId":"V2DriftAlertsController_accountAlerts","summary":"Drift alerts of the account, newest first","description":"Drift alerts are raised at the end of each run of a merged series. An agnostic or brand report has none.","parameters":[{"name":"unreadOnly","required":false,"in":"query","description":"true = unread alerts only","schema":{"type":"boolean"}},{"name":"limit","required":false,"in":"query","description":"1 to 100 (default 50)","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertV2FeedDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/drift-alerts/{alertId}/read":{"patch":{"operationId":"V2DriftAlertsController_markRead","summary":"Mark one drift alert as read","parameters":[{"name":"alertId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAlertV2OneDto"}}}},"404":{"description":"No alert with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/series":{"post":{"operationId":"V2CreationController_createSeries","summary":"Create a recurring series from V2 questions","description":"Each question is asked in ONE country (`market`, lowercase: us ca gb fr de es it jp), from a server in that country, with the same prompt and model everywhere. `markets` creates one question per country. Without either, the account default market applies. The question is never translated: its language is the one sent, or the one detected (`en` when it cannot be told). A country without an active server is refused with 400 before anything is spent. /v1 routes are not affected. Each run of the series checks again that every country is open, and produces a V2 report.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateV2SeriesDto"},"examples":{"monthly":{"summary":"Monthly merged series, first report now","value":{"kind":"merged","pathology":"Atopic dermatitis","brand":"Dupixent","llms":["OpenAI","Gemini"],"competitors":["Rinvoq"],"questions":[{"text":"Quels traitements existent pour la dermatite atopique ?","market":"fr","scope":"agnostic","category":"patient","specificLlms":["OpenAI","GoogleAIO","GoogleAIMode"]},{"text":"Which biologics treat atopic dermatitis?","markets":["us","gb"],"language":"en","scope":"agnostic","category":"professional"},{"text":"How does Dupixent compare with {COMPETITOR}?","market":"us","scope":"brand","category":"competitive","competitor":"Rinvoq"}],"recurrenceType":"MONTHLY","runNow":true}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SeriesDto"}}}},"400":{"description":"Invalid body, country without an active server, plan limit"}},"tags":["V2 · Creation"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"V2SeriesController_list","summary":"Series of the account, the three families together, newest first","description":"/v2 serves only the reports and series created through /v2. Those created through /v1 (brand, agnostic and merged) are not listed and their ids answer 404 (\"… is a V1 report: manage it through the /v1 routes\"): they are read and changed through /v1.","parameters":[{"name":"isActive","required":false,"in":"query","description":"true = only the series that run on their schedule","schema":{"type":"boolean"}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"1 to 100 (default 20)","schema":{"type":"number"}},{"name":"to","required":false,"in":"query","description":"ISO date (the whole day is included) or date-time: series whose last run (lastRunAt) is on or before it. A series that never ran is left out once a date is set.","schema":{}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time: series whose last run (lastRunAt) is on or after it. A series that never ran is left out once a date is set.","schema":{}},{"name":"indication","required":false,"in":"query","description":"Series whose indications include this value, whole value, case-insensitive. Brand and merged series store indications; agnostic series have none.","schema":{}},{"name":"pathology","required":false,"in":"query","description":"Case-insensitive match on the pathology (merged and agnostic series)","schema":{}},{"name":"brand","required":false,"in":"query","description":"Case-insensitive match on the brand (merged series) or the target (brand series)","schema":{}},{"name":"search","required":false,"in":"query","description":"Case-insensitive match on the pathology or the brand","schema":{}},{"name":"kind","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["merged","agnostic","brand"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SeriesListDto"}}}}},"tags":["V2 · Series"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/series/{id}":{"patch":{"operationId":"V2CreationController_updateSeries","summary":"Change the settings of a V2 series","description":"Questions, models, recurrence, activation, name, metadata, indications, tracked terms, brand, brand aliases, competitors, owned domains, countries where promotion is blocked and drift e-mails. Each field sent replaces its value; a field left out keeps it. A new settings version is kept, earlier runs are unchanged; the next runs take the new settings. A field that does not apply to the family of the series is refused with 400 and the reason. A field this route does not take (pathology, kind, or an unknown one) is refused with 400. A series created through /v1 is read and changed through /v1 only: this route answers 404 for it.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateV2SeriesDto"},"examples":{"questions":{"summary":"Replace the questions","value":{"questions":[{"text":"Quels traitements existent pour la dermatite atopique ?","market":"fr","scope":"agnostic","category":"patient","specificLlms":["OpenAI","GoogleAIO","GoogleAIMode"]}]}},"pause":{"summary":"Pause","value":{"isActive":false}},"settings":{"summary":"Rename, metadata, indications, tracked terms","value":{"name":"Dupixent — monthly","metadata":{"source":"sanofi-api"},"indications":["Atopic dermatitis"],"trackedTerms":["IL-13",{"term":"atopic dermatitis","variants":{"fr":["dermatite atopique"]}}]}},"merged":{"summary":"Merged series: brand, competitors, owned domains, blocked countries, drift e-mails","value":{"brand":"Dupixent","brandAliases":["dupilumab"],"competitors":["Rinvoq","Adbry"],"ownedDomains":["sanofi.com",{"url":"pro.campus.sanofi/de","group":"unbranded"},{"url":"dupixent.com","group":"branded"}],"promotionBlockedMarkets":["jp"],"driftEmailOptIn":true}},"agnostic":{"summary":"Agnostic series: countries where a tracked product may not be promoted","value":{"trackedProductPromotion":[{"product":"Dupixent","promotionBlockedMarkets":["jp"]}]}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SeriesDto"}}}},"400":{"description":"Invalid body, or a field this route does not take (named in message)"},"404":{"description":"No series with this id in the account, or a series created through /v1: those are changed through the /v1 routes only (message \"Series … is a V1 series: manage it through the /v1 routes\")"}},"tags":["V2 · Creation"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"V2SeriesController_get","summary":"A series: schedule, active settings and the questions of its next run","description":"The question ids are the ones the answers of every run carry: a question keeps its id from one run to the next as long as its text, country, language, scope, category and competitor stay the same.","parameters":[{"name":"id","required":true,"in":"path","description":"Series id (recurringId of its reports)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesV2ResponseDto"}}}},"403":{"description":"An agnostic series on a plan without agnostic reports (or, for the figures, without the agnostic detail feature)"},"404":{"description":"No report or series with this id in the account, or one created through /v1 (read it through /v1)"}},"tags":["V2 · Series"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"V2ArchiveController_archiveSeries","summary":"Delete (archive) a series and all its runs","description":"Same behaviour and same rights as DELETE /v1/merged/recurring/:id, /v1/agnostic/recurring/:id and /v1/brands/recurring/:id: the series stops running and every run is archived with it. Nothing is erased: the data is kept but no longer listed nor readable by its id, in /v1 as in /v2. There is no route to restore it. A run in progress is not stopped and no credit is refunded, as in /v1. A second call answers 404. Works for /v1 and /v2 series.","parameters":[{"name":"id","required":true,"in":"path","description":"Series id (recurringId of its reports)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ArchivedSeriesDto"}}}},"403":{"description":"An agnostic series on a plan without agnostic reports"},"404":{"description":"No series with this id for this account"}},"security":[{"api-key":[]},{"JWT-auth":[]}],"tags":["V2 · Series"]}},"/v2/series/{id}/runs":{"post":{"operationId":"V2CreationController_runSeries","summary":"Start a run of a V2 series now","description":"Runs the current questions and settings of the series (merged, agnostic or brand) once, outside its schedule, and moves its next scheduled run one period later. Returns at once; the report runs in the background. Subscribe to the webhook event of the family (merged_report.completed for a merged series) to know when it ends, or read GET /v2/reports/:id.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SeriesRunDto"}}}},"400":{"description":"Country without an active server, plan limit (questions, models, countries), not enough credits (code INSUFFICIENT_CREDITS)"},"403":{"description":"Engine not included in the account"},"404":{"description":"No V2 series with this id in the account (a V1 series is run through /v1)"},"409":{"description":"A run of this series, or the same report from elsewhere, is still in progress (existingReportId). A run that ended recently does not block: this route always starts a new one."}},"tags":["V2 · Creation"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"get":{"operationId":"V2SeriesController_runs","summary":"Runs of a series, newest first","description":"Each run is a report, read through /v2/reports/:id.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"1 to 100 (default 20)","schema":{"type":"number"}},{"name":"status","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]}}},{"name":"to","required":false,"in":"query","description":"ISO date (the whole day is included) or date-time: runs created on or before it","schema":{}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time: runs created on or after it","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SeriesRunListDto"}}}},"403":{"description":"An agnostic series on a plan without agnostic reports (or, for the figures, without the agnostic detail feature)"},"404":{"description":"No series with this id for this account"}},"tags":["V2 · Series"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/series/{id}/evolution":{"get":{"operationId":"V2SeriesController_evolution","summary":"Figures of a series run after run","description":"One point per finished run (done or partial), oldest first, with the overall figures of /v2/reports/:id/metrics under the same filters. Follow one question across runs with questionId. A run without any answer in the filters has rates with a null value, never zero.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Latest runs read, 1 to 120 (default 36). A run whose figures were stored once is served without loading it (no filter, or one value of one dimension, or a country with a language or a model); at most 8 other runs are loaded per call, the rest come with the next call (truncated, nextCursor).","schema":{"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous answer, with the same filters: the older runs","schema":{}},{"name":"to","required":false,"in":"query","description":"ISO date (the whole day is included) or date-time: runs created on or before it","schema":{}},{"name":"from","required":false,"in":"query","description":"ISO date or date-time: runs created on or after it","schema":{}},{"name":"marketScope","required":false,"in":"query","description":"Explicit country:language pairs (ch:de,ch:fr). Cannot be combined with market (400). One pair is served from stored figures like a country with a language; several pairs load the runs. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"questionId","required":false,"in":"query","description":"V2 question ids; an edited question gets a new id. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"tags","required":false,"in":"query","description":"Answers to questions with at least one of these tags. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive; an unknown one answers 400. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}}},{"name":"language","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesEvolutionV2ResponseDto"}}}},"403":{"description":"An agnostic series on a plan without agnostic reports (or, for the figures, without the agnostic detail feature)"},"404":{"description":"No series with this id for this account"}},"tags":["V2 · Series"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas":{"get":{"operationId":"V2PersonasController_list","summary":"Personas of the account and archetypes of the Aikka library, newest first","description":"Archived personas are left out unless status=archived is asked. Pass ids to read a known selection without paging.","parameters":[{"name":"base","required":false,"in":"query","schema":{"enum":["patient","professional","payer"],"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"enum":["draft","validated","archived"],"type":"string"}},{"name":"indication","required":false,"in":"query","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","description":"Which personas to return: the account's own, the global library archetypes, or both.","schema":{"default":"all","enum":["all","owned","library"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Case-insensitive match on the persona name","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Comma-separated persona ids. Resolves a known selection without paging the library.","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Cursor (persona id) for pagination","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ListDto"}}}},"403":{"description":"Personas are not included in this account"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"post":{"operationId":"V2PersonasController_create","summary":"Create a persona","description":"Attributes are checked against the schema of the base; the persona can be used in a report at once.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateV2PersonaDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"400":{"description":"Invalid attributes, attributes.base different from base, or a persona with this name already exists"},"403":{"description":"Personas are not included in this account"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/suggest":{"get":{"operationId":"V2PersonasController_suggest","summary":"Library archetypes to propose for a pathology","description":"At most one archetype per base (patient, professional, payer), the most prevalent of each in the therapeutic areas the pathology matches. Empty when the pathology matches none: an unrelated persona would bias the whole report.","parameters":[{"name":"pathology","required":true,"in":"query","schema":{"example":"Atopic dermatitis","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedPersonaV2ListDto"}}}},"400":{"description":"pathology missing"},"403":{"description":"Personas are not included in this account"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/{id}":{"get":{"operationId":"V2PersonasController_get","summary":"A persona of the account or of the library","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"V2PersonasController_update","summary":"Change a persona of the account","description":"Changing the attributes creates the next version (new id) and leaves the earlier one as it was, so the reports that used it keep their meaning. Name, indication, market and languageHint alone are changed in place.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateV2PersonaDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"400":{"description":"Invalid attributes"},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library. Library archetypes are read-only: duplicate one to customise it"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/{id}/versions":{"get":{"operationId":"V2PersonasController_versions","summary":"Every version of a persona (same name), newest first","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2VersionsDto"}}}},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/{id}/duplicate":{"post":{"operationId":"V2PersonasController_duplicate","summary":"Copy a persona of the account or of the library into a new persona of the account","description":"The copy is named \"<name> (copy)\".","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/{id}/validate":{"post":{"operationId":"V2PersonasController_validate","summary":"Mark a persona of the account as validated","description":"Its attributes are checked again against the schema.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library. Library archetypes are read-only: duplicate one to customise it"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/personas/{id}/archive":{"post":{"operationId":"V2PersonasController_archive","summary":"Archive a persona of the account","description":"An archived persona can no longer be given to a new report; the reports that used it are unchanged. A series whose questions use it stops running until its personas are changed with PATCH /v2/series/:id.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaV2ResponseDto"}}}},"403":{"description":"Personas are not included in this account"},"404":{"description":"No persona with this id among the account personas and the library. Library archetypes are read-only: duplicate one to customise it"}},"tags":["V2 · Personas"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/cancel":{"post":{"operationId":"V2RunsController_cancel","summary":"Cancel a pending or running report created through /v2","description":"The report gets the status cancelled and stops at the next step of its run; it stays readable, and its series, if any, keeps running. A merged report cancelled before it started gets all its credits back; cancelled while running, it is billed at the cost it reached when it stopped (credits): answers already requested from the models are still collected and billed, and kept readable. A brand or agnostic report cancelled before its run started no longer counts toward the monthly report quota; once started, it keeps its place. A report created through /v1 answers 404, as on every /v2 route, and is cancelled through /v1 (brand, agnostic); a merged report created through /v1 cannot be cancelled. Only the PharmaGeo MCP server, which reads the reports created through /v1 on /v2, gets 409 CREATED_IN_V1 for them instead, with the /v1 route to use.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2CancelledReportResponseDto"}}}},"403":{"description":"Agnostic report without the agnostic feature of the plan"},"404":{"description":"No report with this id for this account, or a report created through /v1"},"409":{"description":"NOT_CANCELLABLE when the report is not pending or running; CREATED_IN_V1 for a report created through /v1, answered to the PharmaGeo MCP server only"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/owned-domain-audit":{"get":{"operationId":"V2RunsController_ownedDomainAudit","summary":"Audit of the domains the client owns: what their crawled pages say, strengths and gaps","description":"The /v1 owned-domain-audit of brand and agnostic reports, in one format. data is null when the report has no audit: no owned domain, an older report, or a merged report, whose run does not crawl the owned domains (its owned-domain recommendations are in /recommendations).","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedDomainAuditV2ResponseDto"}}}},"403":{"description":"Agnostic report without the agnostic detail feature of the plan"},"404":{"description":"No report with this id for this account"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/cost":{"get":{"operationId":"V2RunsController_cost","summary":"Real cost of a run","description":"What the run cost, in US dollars, as /v1 gives it in cost.realCostUsd: models, web search and Google AI Overviews, plus the Act Mode calls made on this report. Read at each call, never cached: while final is false the run is not finished and costUsd is partial. costUsd is the full cost, tokens sent through the account's own model keys included, and does not convert into credits. Merged reports also give the prepaid credits charged. No detail per model or provider is given.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCostV2ResponseDto"}}}},"403":{"description":"Agnostic report without the agnostic detail feature of the plan"},"404":{"description":"No report with this id for this account, or a report created through /v1"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/recommendations/{recommendationId}/impact":{"get":{"operationId":"V2RunsController_impact","summary":"Change of the figures between a merged report and the latest re-run of one of its recommendations","description":"The /v1 recommendation impact, computed on the /metrics of the two reports with the same filters. Re-runs cancelled or in error are left out: followUp is the latest other re-run, and deltas is null while it is not done or partial. Re-runs are found by their link to the recommendation: those started with POST /v1/merged/reports/:id/recommendations/:recoKey/rerun, and those of a /v2 re-run route once it exists. A report created through /v2 cannot be re-run through /v1, so its followUp stays null until then.","parameters":[{"name":"id","required":true,"in":"path","description":"Source merged report id","schema":{"type":"string"}},{"name":"recommendationId","required":true,"in":"path","description":"Recommendation id, stableId or /v1 key","schema":{"type":"string"}},{"name":"category","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["patient","professional","payer","competitive"]}}},{"name":"scope","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["agnostic","brand"]}}},{"name":"llm","required":false,"in":"query","description":"Models, case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"market","required":false,"in":"query","description":"Two-letter countries. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationImpactV2ResponseDto"}}}},"400":{"description":"The report is not a merged report, or a filter is invalid"},"404":{"description":"No report with this id for this account, or no such recommendation in it"}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/questions/check":{"post":{"operationId":"V2AuthoringController_check","summary":"Check that brand-free questions name no brand, competitor or tracked product","description":"The check POST /v2/reports, POST /v2/series and PATCH /v2/series/:id run on every question with scope \"agnostic\", before anything is spent. Nothing is refused: every question naming one of the names is kept and listed in warnings; one naming the brand or a brand alias (merged) or a tracked product (agnostic) is left out of the brand-free AI visibility (excludedFromBrandFree), and in merged is created as a brand question (scope \"brand\"). Names are matched as whole words, without case, accents or punctuation (Co-Diovan = co diovan); a name written only in a non-Latin script (Дупиксент) is not checked. warnings are the ones creation gives. No model is called. Replaces POST /v1/analysis-suggestions/validate-questions, which misses names with punctuation.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckV2QuestionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2CheckQuestionsResultDto"}}}},"400":{"description":"Invalid body: a value outside its list, or a field this route does not take (named in message)"}},"tags":["V2 · Creation tools"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/questions/classify":{"post":{"operationId":"V2AuthoringController_classify","summary":"Sort pasted questions into patient, professional, payer and competitive","description":"Each line goes to one category; the wording is kept, leading numbering removed. Same model and prompt as POST /v1/brands/report-settings/parse-questions (merged, brand) and /v1/agnostic/agnostic-report-settings/parse-questions (agnostic). Calls a model: the cost is taken from the account credits, as in /v1.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyV2QuestionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2ClassifyQuestionsResultDto"}}}},"400":{"description":"Invalid body: a value outside its list, or a field this route does not take (named in message), too many lines, or an unreadable answer of the model"},"403":{"description":"brand or agnostic asked by an account whose plan does not include the family (code FEATURE_DISABLED), or inactive account (code ACCOUNT_INACTIVE)"}},"tags":["V2 · Creation tools"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/questions/suggestions":{"post":{"operationId":"V2AuthoringController_suggestQuestions","summary":"Suggest questions for a pathology, ready for POST /v2/reports","description":"Questions a person would ask an AI assistant when looking for a treatment, with their scope and category. scope \"market\" gives brand-free questions (the suggestions that name the brand, an alias, a competitor or a tracked product sent are dropped); scope \"brand\" gives questions about the brand, and competitive ones with {COMPETITOR} when competitors are sent. Each question still needs its market. Same service as POST /v1/merged/suggest-questions. Calls a model: the cost is taken from the account credits, as in /v1.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestV2QuestionsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SuggestQuestionsResultDto"}}}},"400":{"description":"Invalid body: a value outside its list, or a field this route does not take (named in message), or scope \"brand\" without brand"},"403":{"description":"Inactive account (code ACCOUNT_INACTIVE)"},"502":{"description":"The model failed: retry"}},"tags":["V2 · Creation tools"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/questions/trending":{"post":{"operationId":"V2AuthoringController_trending","summary":"Trending questions found by a model with web search, for one family and one language","description":"merged: pathology, and optionally brand (adds questions about the brand and competitive ones), as POST /v1/analysis-suggestions/suggest-trending-questions. brand: brand and optionally indications, as /v1/brands/trending-questions. agnostic: pathology, as /v1/agnostic/trending-questions. Each question comes with the scope to send it with. A field the family does not take is refused with 400. Same prompts as /v1. Calls a model: the cost is taken from the account credits, as in /v1.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendingV2QuestionsDto"},"examples":{"merged":{"summary":"Merged","value":{"kind":"merged","pathology":"Atopic dermatitis","brand":"Dupixent","language":"fr"}},"brand":{"summary":"Brand","value":{"kind":"brand","brand":"Dupixent","indications":["Atopic dermatitis"],"language":"en","excludeQuestions":{"patient":["Is Dupixent safe?"]}}},"agnostic":{"summary":"Agnostic","value":{"kind":"agnostic","pathology":"Atopic dermatitis","language":"de"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2TrendingQuestionsResultDto"}}}},"400":{"description":"Invalid body: a value outside its list, or a field this route does not take (named in message), a required field missing, or a field the family does not take"},"403":{"description":"brand or agnostic asked by an account whose plan does not include the family (code FEATURE_DISABLED), or inactive account (code ACCOUNT_INACTIVE)"}},"tags":["V2 · Creation tools"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/competitors/suggestions":{"post":{"operationId":"V2AuthoringController_suggestCompetitors","summary":"Suggest competitors of a brand, with its indications","description":"The indications the brand is approved for in the country and at most 3 prescription medicines approved there for the same indications, under their brand names in that country. A model with web search looks them up and gives a source for each; an item without source, not prescription-only or not marketed in the country is left out, so there can be fewer, or none: check them before use. /v1 (GET /v1/brands/competitors-context, POST /v1/analysis-suggestions/suggest-competitors) keeps its own call, without web search. Calls a model: the cost is taken from the account credits, as in /v1.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestV2CompetitorsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2SuggestedCompetitorsResultDto"}}}},"400":{"description":"Invalid body: a value outside its list, or a field this route does not take (named in message)"},"403":{"description":"Inactive account (code ACCOUNT_INACTIVE)"},"502":{"description":"The model failed: retry"}},"tags":["V2 · Creation tools"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/account/limits":{"get":{"operationId":"V2AccountController_limits","summary":"Monthly quotas of the plan and their use","description":"Same counts as /v1 brands/brand-limits, for brand and agnostic reports: the limits POST /v2/reports applies before creating a report of these families. A family the plan does not include reads as null. Merged reports have a monthly question quota and a per-report question cap, the ones POST /v2/reports applies (each question counts once per country); the quota resets with the monthly credits. They also spend credits, checked when the report is created (400 INSUFFICIENT_CREDITS).","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AccountLimitsDto"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Account"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/llms":{"get":{"operationId":"V2AccountController_llms","summary":"Engines a report of this account can ask","description":"The language models configured on the server, as /v1 llm/available lists them, with the report families of this account that accept each one. Google AI Overviews and AI Mode are listed when the Google option of the plan is on for at least one family and the server has a search provider for that engine: an engine missing here would be left out of the report.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2EnginesResponseDto"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Account"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/agent/chat":{"post":{"operationId":"V2AgentController_chat","summary":"Conversational agent that builds and launches a report","description":"Enabled by the agent feature of the plan (403 otherwise), as in /v1. Same agent, instructions and tools as /v1 merged/agent: it can launch a report or run a series of this account now, only after the user confirmed it in the conversation. A report launched from /v2 is a V2 merged report, created as POST /v2/reports creates one: each question is asked as written, never translated, once in each country of draftConfig.markets, and the report is read and configured through /v2. Each question is the text of the client, already in its language: it is never rewritten or translated, and its language is the one the V2 detection finds in it, so draftConfig.languages is not required. A report is only dispatched per country and per engine. The agent asks the user for the countries and never picks them: until they are set, missingFields lists markets and nothing is launched. Before launching, the agent checks the draft against the plan as POST /v2/reports does (each question once per country) and tells the user how many questions are asked and what the plan allows when a launch is refused. Each turn is billed in credits at the real cost of its model calls, even when no report is launched; a launched report then spends credits as any report does. The turn is saved in the conversation. Do not send personal or patient data.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AgentChatDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AgentChatReplyDto"}}}},"400":{"description":"Invalid body (role other than user or assistant, too many or too long messages, draftConfig too large)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Agent not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"conversationId is not a conversation of this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/agent/conversations":{"get":{"operationId":"V2AgentController_list","summary":"Saved agent and copilot conversations, most recent first","description":"Enabled by the agent feature of the plan (403 otherwise), as in /v1. Same agent, instructions and tools as /v1 merged/agent: it can launch a report or run a series of this account now, only after the user confirmed it in the conversation. A report launched from /v2 is a V2 merged report, created as POST /v2/reports creates one: each question is asked as written, never translated, once in each country of draftConfig.markets, and the report is read and configured through /v2. Each question is the text of the client, already in its language: it is never rewritten or translated, and its language is the one the V2 detection finds in it, so draftConfig.languages is not required. A report is only dispatched per country and per engine. The agent asks the user for the countries and never picks them: until they are set, missingFields lists markets and nothing is launched. Before launching, the agent checks the draft against the plan as POST /v2/reports does (each question once per country) and tells the user how many questions are asked and what the plan allows when a launch is refused.","parameters":[{"name":"kind","required":false,"in":"query","schema":{"enum":["agent","copilot"],"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"nextCursor of the previous page","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Conversations per page, 1 to 100 (default 20)","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AgentConversationListDto"}}}},"400":{"description":"Invalid kind, cursor or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Agent not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/agent/conversations/{conversationId}":{"get":{"operationId":"V2AgentController_conversation","summary":"One conversation with its messages","description":"Enabled by the agent feature of the plan (403 otherwise), as in /v1. Same agent, instructions and tools as /v1 merged/agent: it can launch a report or run a series of this account now, only after the user confirmed it in the conversation. A report launched from /v2 is a V2 merged report, created as POST /v2/reports creates one: each question is asked as written, never translated, once in each country of draftConfig.markets, and the report is read and configured through /v2. Each question is the text of the client, already in its language: it is never rewritten or translated, and its language is the one the V2 detection finds in it, so draftConfig.languages is not required. A report is only dispatched per country and per engine. The agent asks the user for the countries and never picks them: until they are set, missingFields lists markets and nothing is launched. Before launching, the agent checks the draft against the plan as POST /v2/reports does (each question once per country) and tells the user how many questions are asked and what the plan allows when a launch is refused.","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AgentConversationDetailDto"}}}},"403":{"description":"Agent not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No conversation with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"V2AgentController_archive","summary":"Archive a conversation","description":"It no longer appears in the list. Enabled by the agent feature of the plan (403 otherwise), as in /v1. Same agent, instructions and tools as /v1 merged/agent: it can launch a report or run a series of this account now, only after the user confirmed it in the conversation. A report launched from /v2 is a V2 merged report, created as POST /v2/reports creates one: each question is asked as written, never translated, once in each country of draftConfig.markets, and the report is read and configured through /v2. Each question is the text of the client, already in its language: it is never rewritten or translated, and its language is the one the V2 detection finds in it, so draftConfig.languages is not required. A report is only dispatched per country and per engine. The agent asks the user for the countries and never picks them: until they are set, missingFields lists markets and nothing is launched. Before launching, the agent checks the draft against the plan as POST /v2/reports does (each question once per country) and tells the user how many questions are asked and what the plan allows when a launch is refused.","parameters":[{"name":"conversationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Conversation archived"},"403":{"description":"Agent not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No conversation with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/agent/chat":{"post":{"operationId":"V2ReportCopilotController_chat","summary":"Copilot: questions on one report, answered as a stream (SSE)","description":"Same copilot, instructions and tools as /v1 merged/reports/{id}/agent/chat: it reads this report only and changes nothing. Merged reports only (404 COPILOT_NOT_AVAILABLE for brand and agnostic). Enabled by the agent feature of the plan (403 otherwise). The report and the conversation are checked before the stream opens: an unknown id answers 404 as JSON. The answer is a text/event-stream: `tool` { name } while the copilot gathers data (0 to n), `token` { delta } for each piece of text, then one `done` { reply, usedTools, conversationId } (conversationId null when saving failed), or one `error` { code, message }. Do not send personal or patient data.","parameters":[{"name":"id","required":true,"in":"path","description":"Merged report id (a run, not a series)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2CopilotChatDto"}}}},"responses":{"200":{"description":"Stream of copilot events"},"400":{"description":"Invalid body","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Agent not in the plan","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account, a brand or agnostic report (COPILOT_NOT_AVAILABLE), or conversationId not of this account","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Agent"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/reports/{id}/youtube":{"get":{"operationId":"V2YouTubeController_youtube","summary":"YouTube channels and videos cited by the Google AI Overviews of a report","description":"Same counts as /v1 google/overviews/youtube read on this report: channels sorted by citations, the 10 most cited videos of each. Enabled by the Google AI Overviews option of the plan for the family of the report, the one POST /v2/reports checks (403 otherwise): the brand option for a brand report, the agnostic option for an agnostic report, either one for a merged report. /v1 asks for the brand option in every case. An agnostic report needs the agnostic detail feature of the plan (403 otherwise). A report without Google AI Overviews gives an empty list.","parameters":[{"name":"id","required":true,"in":"path","description":"Report id (a run, not a series)","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Overviews of the Google searches made in these languages. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2YouTubeChannelsDto"}}}},"400":{"description":"Unknown language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Google AI Overviews or agnostic detail not in the plan, or brand reports not in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}},"/v2/public-index/therapeutic-areas":{"get":{"operationId":"V2PublicIndexController_areas","summary":"Therapeutic areas of the public index","description":"Areas with at least one report, as /v1 public/index/therapeutic-areas. No authentication. Reads only the reports of the dedicated public index account (503 when the server has none), never a customer report. 30 requests per 60 s per IP address on all public index routes (429 with Retry-After beyond).","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2PublicAreasDto"}}}},"429":{"description":"Too many requests from this IP address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Public index"]}},"/v2/public-index/therapeutic-areas/{id}/evolution":{"get":{"operationId":"V2PublicIndexController_evolution","summary":"Share of voice and appearance rate of an area over time","description":"Same data as /v1 public/index/evolution, for the area of this id. No authentication. Reads only the reports of the dedicated public index account (503 when the server has none), never a customer report. 30 requests per 60 s per IP address on all public index routes (429 with Retry-After beyond).","parameters":[{"name":"id","required":true,"in":"path","description":"Area id from /v2/public-index/therapeutic-areas","schema":{"type":"string"}},{"name":"llm","required":false,"in":"query","description":"Metrics of these models (OpenAI,Gemini), case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Metrics of the answers in these languages. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgnosticEvolutionResponseDto"}}}},"400":{"description":"Invalid id, language or llm","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No area with this id in the public index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Too many requests from this IP address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Public index"]}},"/v2/public-index/reports/{id}/sources":{"get":{"operationId":"V2PublicIndexController_sources","summary":"Most cited sources of a public index report","description":"Same counts as /v1 public/index/sources. A report outside the public index gives an empty list, as in /v1. No authentication. Reads only the reports of the dedicated public index account (503 when the server has none), never a customer report. 30 requests per 60 s per IP address on all public index routes (429 with Retry-After beyond).","parameters":[{"name":"id","required":true,"in":"path","description":"Report id from evolution[].reportId","schema":{"type":"string"}},{"name":"marketScope","required":false,"in":"query","description":"Country:language pairs (us:en,fr:fr). Cannot be combined with market (400). Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"market","required":false,"in":"query","description":"Two-letter countries. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{}}},{"name":"llm","required":false,"in":"query","description":"Case-insensitive. Comma-separated or repeated; values are combined with OR.","schema":{}},{"name":"language","required":false,"in":"query","description":"Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2PublicSourcesDto"}}}},"400":{"description":"Invalid id or filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"429":{"description":"Too many requests from this IP address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"503":{"description":"Public index not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Public index"]}},"/v2/ai-overviews":{"get":{"operationId":"V2AiOverviewsController_list","summary":"Google AI Overviews collected for the reports of the account","description":"Same rows as /v1 google/overviews, newest first, without the rows /v1 uses to store the YouTube citations of a report (query \"Report YouTube Citations\", no Google search behind them: read them through /v2/reports/:id/youtube): the Google search, its language and country, whether Google showed an AI Overview, its text, the YouTube videos it cites and the Search Console figures when known. pathology keeps the overviews collected for reports of that therapeutic area (exact value, as in /v1); reportId keeps one report. Only the families whose Google AI Overviews option is in the plan are read (brand option for brand reports, agnostic option and agnostic detail for agnostic reports, either option for merged reports): 403 when none is. Nothing is translated: an overview is in the language of its search.","parameters":[{"name":"to","required":false,"in":"query","description":"Overviews dated on or before this day (UTC, the whole day).","schema":{}},{"name":"from","required":false,"in":"query","description":"Overviews dated on or after this day (UTC).","schema":{}},{"name":"market","required":false,"in":"query","description":"Country of the Google search (two letters, lowercase). Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{}}},{"name":"language","required":false,"in":"query","description":"Language of the Google search. Comma-separated or repeated; values are combined with OR.","schema":{"type":"array","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},{"name":"reportId","required":false,"in":"query","description":"One report (a run, V2 id). 404 when the account has no such report, 403 when its family has no Google option.","schema":{}},{"name":"pathology","required":false,"in":"query","description":"Therapeutic area the reports were run on, exact value (one).","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2AiOverviewsDto"}}}},"400":{"description":"Unknown language, invalid country or date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"403":{"description":"Google AI Overviews not in the plan for any family, or for the family of the report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}},"404":{"description":"No report with this id for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponseDto"}}}}},"tags":["V2 · Reports"],"security":[{"api-key":[]},{"JWT-auth":[]}]}}},"info":{"title":"PharmaGeo API","description":"API for pharmaceutical reputation management via LLM. All public endpoints are versioned: use the base path /v1/ (e.g. /v1/brands/reports, /v1/agnostic/reports). Health check and Stripe webhook remain unversioned. File exports exist in both versions: /v2/reports/{id}/export?format=ndjson (brand and agnostic reports, as /v1/brands/reports/{id}/export and /v1/agnostic/reports/{id}/export), /v2/reports/{id}/export?format=csv (agnostic reports, as /v1/agnostic/reports/export/csv/{id}) and /v2/reports/{id}/act-mode/drafts/export (Act Mode drafts of the three families, as …/act-mode/drafts/export/… in /v1). As in /v1, a merged report has no NDJSON or CSV export. /v2 serves only the reports and series created through /v2. Those created through /v1 (brand, agnostic and merged) are not listed and their ids answer 404 (\"… is a V1 report: manage it through the /v1 routes\"): they are read and changed through /v1.","version":"1","contact":{}},"tags":[],"servers":[{"url":"https://api.pharma-geo.com","description":"Production"},{"url":"https://api.aikka-pharma.com","description":"Production (api.aikka-pharma.com)"},{"url":"http://localhost:3000","description":"Local development"}],"components":{"securitySchemes":{"JWT-auth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","name":"JWT","description":"Enter JWT token","in":"header"},"api-key":{"scheme":"bearer","bearerFormat":"API Key","type":"http","name":"Authorization","description":"Enter only your API key (e.g. phg_sk_...). Do not add \"Bearer\" — it is sent automatically.","in":"header"}},"schemas":{"HealthResponseDto":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"timestamp":{"type":"string","example":"2026-04-30T12:00:00.000Z"}},"required":["status","timestamp"]},"BrandReportListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Report unique identifier"},"title":{"type":"string","description":"Report title"},"format":{"type":"string","description":"Report format","example":"pdf"},"status":{"type":"string","description":"Report status","example":"done"},"createdAt":{"type":"string","description":"Creation date (ISO 8601)"},"recurringReportId":{"type":"object","nullable":true,"description":"Recurring report ID when generated from a recurring schedule"},"metadata":{"type":"object","description":"Opaque metadata blob from the report row"}},"required":["id","title","format","status","createdAt"]},"PaginationMetaDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items","example":42},"page":{"type":"number","description":"Current page (1-based)","example":1},"limit":{"type":"number","description":"Number of items per page (capped to keep response under 4MB)","example":20},"pages":{"type":"number","description":"Total number of pages","example":3},"order":{"type":"string","description":"Sort order","enum":["asc","desc"]}},"required":["total","page","limit","pages","order"]},"PaginatedBrandReportsResponseDto":{"type":"object","properties":{"data":{"description":"List of brand reports (slim rows from listForAccountProduct)","type":"array","items":{"$ref":"#/components/schemas/BrandReportListItemDto"}},"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetaDto"}]}},"required":["data","meta"]},"PendingBrandReportItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Report unique identifier"},"title":{"type":"string","description":"Report title"},"status":{"type":"string","description":"Report status","enum":["pending","running"]},"createdAt":{"type":"string","description":"Creation date (ISO 8601)"}},"required":["id","title","status","createdAt"]},"PendingBrandReportResponseDto":{"type":"object","properties":{"hasPending":{"type":"boolean","description":"Whether at least one report is currently being generated"},"reports":{"description":"List of pending/running reports (newest first)","example":[{"id":"3017cb06-d4ea-496a-8e2a-e2aa240246f6","title":"Doliprane","status":"running","createdAt":"2026-02-17T14:14:01.737Z"},{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","title":"Dafalgan","status":"pending","createdAt":"2026-02-17T14:10:00.000Z"}],"type":"array","items":{"$ref":"#/components/schemas/PendingBrandReportItemDto"}}},"required":["hasPending","reports"]},"SourceSchemaDto":{"type":"object","properties":{"title":{"type":"string","example":"EMA Summary of Product Characteristics"},"link":{"type":"string","example":"https://www.ema.europa.eu/..."},"type":{"type":"string","enum":["Regulatory","Guideline","PubMed","Cochrane","ClinicalTrials","Society","Manufacturer","News"]},"reliability":{"type":"number","example":88},"llmName":{"type":"string"},"language":{"type":"string","example":"fr"},"questionType":{"type":"string","enum":["patient","professional","competitive"]},"questionText":{"type":"string"},"usageCount":{"type":"number"},"questionTypes":{"type":"array","items":{"type":"string"}}},"required":["title","link","type"]},"PatientQuestionItemDto":{"type":"object","properties":{"question":{"type":"string"},"answer_original":{"type":"string","description":"Answer in original language"},"answer_english":{"type":"string","description":"Answer in English"},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"score":{"type":"number","example":75},"reliability":{"type":"number","example":85},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchemaDto"}},"not_triggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"}},"required":["question","answer_original","answer_english","sentiment","score","reliability"]},"PatientQuestionsDataItemDto":{"type":"object","properties":{"language":{"type":"string","example":"fr"},"patient_questions":{"type":"array","items":{"$ref":"#/components/schemas/PatientQuestionItemDto"}},"error":{"type":"string"}},"required":["language","patient_questions"]},"PatientQuestionsLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string","example":"OpenAI"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PatientQuestionsDataItemDto"}}},"required":["llmName","data"]},"ProfessionalQuestionItemDto":{"type":"object","properties":{"question":{"type":"string"},"answer_original":{"type":"string"},"answer_english":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"score":{"type":"number"},"reliability":{"type":"number"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchemaDto"}},"not_triggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"}},"required":["question","answer_original","answer_english","sentiment","score","reliability"]},"ProfessionalQuestionsDataItemDto":{"type":"object","properties":{"language":{"type":"string"},"professional_questions":{"type":"array","items":{"$ref":"#/components/schemas/ProfessionalQuestionItemDto"}},"error":{"type":"string"}},"required":["language","professional_questions"]},"ProfessionalQuestionsLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfessionalQuestionsDataItemDto"}}},"required":["llmName","data"]},"CompetitiveQuestionItemDto":{"type":"object","properties":{"question":{"type":"string"},"answer_original":{"type":"string"},"answer_english":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"score":{"type":"number"},"reliability":{"type":"number"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchemaDto"}},"not_triggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"}},"required":["question","answer_original","answer_english","sentiment","score","reliability"]},"CompetitiveAnalysisCompetitorDto":{"type":"object","properties":{"competitorBrandName":{"type":"string","example":"Competitor Brand Name"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/CompetitiveQuestionItemDto"}}},"required":["competitorBrandName","questions"]},"CompetitiveAnalysisDataItemDto":{"type":"object","properties":{"language":{"type":"string"},"competitor_analysis":{"$ref":"#/components/schemas/CompetitiveAnalysisCompetitorDto"},"error":{"type":"string"}},"required":["language","competitor_analysis"]},"CompetitiveAnalysisLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CompetitiveAnalysisDataItemDto"}}},"required":["llmName","data"]},"SourcesDataItemDto":{"type":"object","properties":{"language":{"type":"string"},"topSources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchemaDto"}},"error":{"type":"string"}},"required":["language","topSources"]},"SourcesLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SourcesDataItemDto"}}},"required":["llmName","data"]},"RecommendationActionItemDto":{"type":"object","properties":{"title_original":{"type":"string"},"title_english":{"type":"string"},"description_original":{"type":"string"},"description_english":{"type":"string"},"steps_original":{"type":"array","items":{"type":"string"}},"steps_english":{"type":"array","items":{"type":"string"}},"expected_impact_original":{"type":"string"},"expected_impact_english":{"type":"string"},"context_original":{"type":"string"},"context_english":{"type":"string"},"target_source":{"type":"string","enum":["Wikipedia","Guideline","Regulatory","PubMed","ClinicalTrials.gov","Society/Association","KnowledgeBase","StructuredData"]},"priority":{"type":"string","enum":["High","Med","Low"]},"weak_area_addressed":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchemaDto"}}},"required":["title_original","title_english","description_original","description_english","steps_original","steps_english","expected_impact_original","expected_impact_english","context_original","context_english","target_source","priority","weak_area_addressed"]},"GeoRecommendationGroupDto":{"type":"object","properties":{"summary_original":{"type":"array","items":{"type":"string"}},"summary_english":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationActionItemDto"}}},"required":["summary_original","summary_english","actions"]},"GeoRecommendationsItemDto":{"type":"object","properties":{"llmName":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","example":"GEO"},"recommendations":{"$ref":"#/components/schemas/GeoRecommendationGroupDto"},"error":{"type":"string"}},"required":["llmName","language","type","recommendations"]},"AeoRecommendationsItemDto":{"type":"object","properties":{"llmName":{"type":"string"},"language":{"type":"string"},"type":{"type":"string","example":"AEO"},"recommendations":{"$ref":"#/components/schemas/GeoRecommendationGroupDto"},"error":{"type":"string"}},"required":["llmName","language","type","recommendations"]},"RecommendationsParsedDto":{"type":"object","properties":{"geo":{"description":"GEO recommendations per LLM/language","type":"array","items":{"$ref":"#/components/schemas/GeoRecommendationsItemDto"}},"aeo":{"description":"AEO recommendations per LLM/language","type":"array","items":{"$ref":"#/components/schemas/AeoRecommendationsItemDto"}},"ownedDomain":{"type":"array","items":{"type":"object"},"description":"Owned domain recommendations"},"ownedDomainAudit":{"type":"object","nullable":true,"description":"Owned domain audit result"},"legacy":{"type":"array","items":{"type":"object"},"description":"Legacy recommendations"}},"required":["geo","aeo"]},"CloudWordItemDto":{"type":"object","properties":{"word":{"type":"string","example":"treatment"},"occurence":{"type":"string","example":"42"}},"required":["word","occurence"]},"CloudWordDataItemDto":{"type":"object","properties":{"language":{"type":"string"},"cloudwords":{"type":"array","items":{"$ref":"#/components/schemas/CloudWordItemDto"}},"error":{"type":"string"}},"required":["language","cloudwords"]},"CloudWordsLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CloudWordDataItemDto"}}},"required":["llmName","data"]},"TrendingQuestionItemDto":{"type":"object","properties":{"question":{"type":"string","example":"How to use this product?"},"category":{"type":"string","enum":["patient","professional","competitive"]}},"required":["question","category"]},"TrendingQuestionsLanguageDto":{"type":"object","properties":{"language":{"type":"string","example":"fr"},"trending_questions":{"type":"array","items":{"$ref":"#/components/schemas/TrendingQuestionItemDto"}}},"required":["language","trending_questions"]},"EngineAppearanceDto":{"type":"object","properties":{"asked":{"type":"number","example":20},"shown":{"type":"number","example":12},"rate":{"type":"number","example":60,"description":"shown / asked, integer percent 0-100"}},"required":["asked","shown","rate"]},"OverviewDataItemDto":{"type":"object","properties":{"market":{"type":"string","example":"EU"},"labOrProduct":{"type":"string","example":"Product Name"},"model":{"type":"string","example":"OpenAI"},"overallScore":{"type":"number","example":72},"positiveReviews":{"type":"string","example":"75%"},"overallReliability":{"type":"number","example":82},"overallSentiment":{"type":"string","enum":["positive","neutral","negative"]},"overallSummary":{"type":"string"},"competitorsUsed":{"example":["Competitor A","Competitor B"],"type":"array","items":{"type":"string"}},"ownedDomains":{"type":"array","items":{"type":"string"}},"citationFrequency":{"type":"number","example":45},"aiVisibilityScore":{"type":"number","example":68},"engineAppearance":{"description":"Google engines only: questions where Google showed an AI answer (shown) out of questions asked","allOf":[{"$ref":"#/components/schemas/EngineAppearanceDto"}]},"netSentimentScore":{"type":"number","example":12}},"required":["market","labOrProduct","model","overallScore","positiveReviews","overallReliability","overallSentiment","overallSummary","competitorsUsed"]},"OverviewLlmGroupDto":{"type":"object","properties":{"llmName":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OverviewDataItemDto"}}},"required":["llmName","data"]},"DiscoverabilityModelItemDto":{"type":"object","properties":{"llmName":{"type":"string"},"responseStatus":{"type":"string","enum":["ok","parse_error","llm_error"]},"recognition":{"type":"string","enum":["Brand","INN","DrugClass","NotFound"]},"framing":{"type":"string","enum":["1st choice","Alternative","Not mentioned"]},"competitorsMentioned":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"}},"required":["llmName","responseStatus","recognition","framing","competitorsMentioned"]},"DiscoverabilityDataDto":{"type":"object","properties":{"mode":{"type":"string","enum":["brand_agnostic","user_prompt"]},"promptSource":{"type":"string","enum":["system_generated","user_defined"]},"questionAsked":{"type":"string"},"promptUsed":{"type":"string"},"sourceQuestion":{"type":"string"},"resolvedIndication":{"type":"string"},"resolvedInn":{"type":"string"},"brandRecognition":{"type":"number"},"innOnly":{"type":"number"},"drugClass":{"type":"number"},"notFound":{"type":"number"},"parseError":{"type":"number"},"llmError":{"type":"number"},"models":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverabilityModelItemDto"}},"competitorsMentioned":{"type":"array","items":{"type":"string"}}},"required":["mode","promptSource","questionAsked","promptUsed","brandRecognition","innOnly","drugClass","notFound","parseError","llmError","models","competitorsMentioned"]},"BenefitRiskMatrixItemDto":{"type":"object","properties":{"item":{"type":"string"},"models":{"type":"object","example":{"OpenAI":true,"Claude":false}},"mentionCount":{"type":"number"}},"required":["item","models","mentionCount"]},"RiskBenefitDataDto":{"type":"object","properties":{"ordering":{"type":"string","enum":["Benefits first","Risks first"]},"orderingPercentage":{"type":"number"},"benefitsMatrix":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRiskMatrixItemDto"}},"risksMatrix":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRiskMatrixItemDto"}},"totalUniqueBenefits":{"type":"number"},"totalUniqueRisks":{"type":"number"},"benefitsConsistency":{"type":"number"},"risksConsistency":{"type":"number"}},"required":["ordering","orderingPercentage","benefitsMatrix","risksMatrix","totalUniqueBenefits","totalUniqueRisks","benefitsConsistency","risksConsistency"]},"LlmCountDto":{"type":"object","properties":{"llmName":{"type":"string"},"count":{"type":"number"}},"required":["llmName","count"]},"IndicationMatrixItemDto":{"type":"object","properties":{"item":{"type":"string"},"models":{"type":"object"},"mentionCount":{"type":"number"}},"required":["item","models","mentionCount"]},"IndicationsContraindicationsDataDto":{"type":"object","properties":{"indicationsCount":{"type":"array","items":{"$ref":"#/components/schemas/LlmCountDto"}},"contraindicationsCount":{"type":"array","items":{"$ref":"#/components/schemas/LlmCountDto"}},"indicationsRange":{"type":"object","example":{"min":3,"max":8}},"contraindicationsRange":{"type":"object","example":{"min":1,"max":4}},"indicationsMatrix":{"type":"array","items":{"$ref":"#/components/schemas/IndicationMatrixItemDto"}},"contraindicationsMatrix":{"type":"array","items":{"$ref":"#/components/schemas/IndicationMatrixItemDto"}}},"required":["indicationsCount","contraindicationsCount","indicationsRange","contraindicationsRange","indicationsMatrix","contraindicationsMatrix"]},"MedicalRegulatoryLanguageDto":{"type":"object","properties":{"language":{"type":"string"},"discoverability":{"$ref":"#/components/schemas/DiscoverabilityDataDto"},"riskBenefit":{"$ref":"#/components/schemas/RiskBenefitDataDto"},"indicationsContraindications":{"$ref":"#/components/schemas/IndicationsContraindicationsDataDto"},"medicalInformationScenarios":{"type":"object"},"pharmacovigilance":{"type":"object"}},"required":["language","discoverability","riskBenefit","indicationsContraindications"]},"BrandReportDetailResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Report unique identifier"},"accountProductId":{"type":"string","description":"Account product ID"},"authorUserId":{"type":"object","description":"Author user ID","nullable":true},"title":{"type":"string","description":"Report title"},"content":{"type":"string","description":"Report content (e.g. full text or HTML)"},"format":{"type":"string","description":"Report format","example":"pdf"},"status":{"type":"string","description":"Report status","example":"done"},"createdAt":{"type":"string","description":"Creation date (ISO 8601)"},"patientQuestions":{"description":"Patient questions. Returned as JSON string; when parsed: array of LLM groups, each with language and patient_questions (question, answer_original, answer_english, sentiment, score, reliability, sources).","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/PatientQuestionsLlmGroupDto"}},"professionalQuestions":{"description":"Professional questions. Returned as JSON string; when parsed: same structure as patientQuestions.","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ProfessionalQuestionsLlmGroupDto"}},"competitiveAnalysis":{"description":"Competitive analysis. Returned as JSON string; when parsed: per-LLM, per-language, with competitor_analysis.competitorBrandName and questions array.","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/CompetitiveAnalysisLlmGroupDto"}},"sources":{"description":"Aggregated sources. Returned as JSON string; when parsed: per-LLM groups with topSources (title, link, type, reliability).","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/SourcesLlmGroupDto"}},"recommendations":{"description":"Recommendations. Returned as JSON string; when parsed: object with geo[], aeo[], ownedDomain[], ownedDomainAudit, legacy[].","nullable":true,"allOf":[{"$ref":"#/components/schemas/RecommendationsParsedDto"}]},"cloudwords":{"description":"Word cloud data. Returned as JSON string; when parsed: per-LLM groups with cloudwords (word, occurence).","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/CloudWordsLlmGroupDto"}},"trendingQuestions":{"description":"Trending questions by language. Returned as JSON string; when parsed: array of { language, trending_questions: [{ question, category }] }.","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/TrendingQuestionsLanguageDto"}},"overview":{"description":"Overview metrics per LLM. Returned as JSON string; when parsed: market, labOrProduct, model, overallScore, overallReliability, overallSentiment, overallSummary, competitorsUsed, citationFrequency, aiVisibilityScore, netSentimentScore.","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/OverviewLlmGroupDto"}},"productNames":{"type":"object","description":"Product name variations. Returned as JSON string; when parsed: object with language keys and string[] values, e.g. { \"fr\": [\"Doliprane\"], \"en\": [\"Tylenol\"] }.","nullable":true,"example":{"fr":["Doliprane","Paracétamol"],"en":["Tylenol"]}},"indications":{"description":"Indications. Returned as JSON string; when parsed: array of strings.","nullable":true,"type":"array","items":{"type":"string"}},"medicalRegulatoryAnalysis":{"description":"Medical & regulatory analysis per language. Returned as JSON string; when parsed: discoverability (brandRecognition, innOnly, models), riskBenefit (ordering, benefitsMatrix, risksMatrix), indicationsContraindications (indicationsMatrix, contraindicationsMatrix).","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/MedicalRegulatoryLanguageDto"}},"recurringReportId":{"type":"object","description":"Recurring report ID if generated by recurring","nullable":true},"trackedTerms":{"description":"Tracked terms snapshot at generation. JSON string when parsed: string[].","nullable":true,"type":"array","items":{"type":"string"}},"termMentionRates":{"type":"object","description":"Per-term mention rates at generation. JSON string when parsed: { aggregate, byLanguage?, byLlm? }.","nullable":true}},"required":["id","accountProductId","title","content","format","status","createdAt"]},"BrandUsageStatsDto":{"type":"object","properties":{"reportsUsed":{"type":"number","example":2,"description":"Brand reports created in the current billing month for this AccountProduct"},"reportsLimit":{"type":"number","example":10,"description":"Monthly report quota from plan (-1 = unlimited)"},"remainingReports":{"type":"number","example":8,"description":"Remaining reports this month (-1 when unlimited)"},"resetDate":{"format":"date-time","type":"string","example":"2026-06-01T00:00:00.000Z","description":"Start of the next monthly reset window"}},"required":["reportsUsed","reportsLimit","remainingReports","resetDate"]},"CreateBrandReportResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"title":{"type":"string","example":"Doliprane"},"createdAt":{"type":"object","example":"2026-04-30T12:00:00.000Z"},"status":{"type":"string","example":"running","enum":["pending","running","done","error","cancelled"],"description":"Initial status. Reports start as `running` and can be polled via GET /brands/reports/pending."},"brandUsage":{"description":"Usage stats AFTER creation (for the current AccountProduct)","allOf":[{"$ref":"#/components/schemas/BrandUsageStatsDto"}]},"reportUsage":{"description":"Alias of `brandUsage` — kept for backwards compatibility with older clients.","allOf":[{"$ref":"#/components/schemas/BrandUsageStatsDto"}]}},"required":["id","title","createdAt","status","brandUsage","reportUsage"]},"CancelReportResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"report":{"type":"object","description":"The cancelled report (current snapshot — status will be `cancelled`)","additionalProperties":true}},"required":["success","report"]},"GeneratedReportListItemDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"title":{"type":"string","example":"Doliprane — week 17"},"status":{"type":"string","example":"done","enum":["pending","running","done","error","cancelled"]},"target":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","title","status","createdAt","updatedAt"]},"CursorPageMetaSimpleDto":{"type":"object","properties":{"nextCursor":{"type":"object","nullable":true,"description":"Cursor for the next page, or null when there is no more data"},"hasMore":{"type":"boolean"},"total":{"type":"number","description":"Total number of items (only present when includeTotal=true)"}},"required":["nextCursor","hasMore"]},"GeneratedReportsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedReportListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaSimpleDto"}},"required":["data","meta"]},"CompetitorsContextResponseDto":{"type":"object","properties":{"competitors":{"type":"array","description":"Competitor product names suggested by the LLM — 3 per call, plain strings (not objects).","example":["Rinvoq","Cibinqo","Adbry"],"items":{"type":"string"}},"indications":{"type":"array","description":"Usage-context keywords for the product (therapeutic areas / indications) as returned by the LLM: steered by the `indications` query param when it is provided, inferred from the product alone otherwise.","example":["atopic dermatitis","severe asthma","chronic rhinosinusitis with nasal polyps"],"items":{"type":"string"}}},"required":["competitors","indications"]},"ParseQuestionsResponseDto":{"type":"object","properties":{"patient":{"example":["Quels sont les effets secondaires ?"],"type":"array","items":{"type":"string"}},"professional":{"example":["Quelle est la pharmacocinétique du paracétamol ?"],"type":"array","items":{"type":"string"}},"payer":{"example":["Quel est le coût-efficacité du paracétamol pour le payeur ?"],"description":"Questions classified for payers / market access.","type":"array","items":{"type":"string"}},"competitor":{"example":["Doliprane vs Dafalgan : différences ?"],"description":"Brand-only: questions reclassified as competitor questions.","type":"array","items":{"type":"string"}},"unclassified":{"example":["??? unparseable line"],"description":"Lines the classifier could not bucket; surfaced to the user for manual handling.","type":"array","items":{"type":"string"}}},"required":["patient","professional"]},"RecurringBrandReportShellDto":{"type":"object","properties":{"id":{"type":"string"},"accountProductId":{"type":"string"},"target":{"type":"string"},"recurrenceType":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"llms":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"indications":{"nullable":true,"type":"array","items":{"type":"string"}},"competitors":{"nullable":true,"type":"array","items":{"type":"string"}},"metadata":{"type":"object","description":"Opaque metadata blob from the recurring report row"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","accountProductId","target","isActive","llms","languages","createdAt","updatedAt"]},"RecurringBrandWithSettingsDto":{"type":"object","properties":{"id":{"type":"string"},"accountProductId":{"type":"string"},"target":{"type":"string"},"recurrenceType":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"llms":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"indications":{"nullable":true,"type":"array","items":{"type":"string"}},"competitors":{"nullable":true,"type":"array","items":{"type":"string"}},"metadata":{"type":"object","description":"Opaque metadata blob from the recurring report row"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"activeReportSettings":{"type":"object","description":"Active report settings linked to this recurring report (if any)","additionalProperties":true,"nullable":true},"reportSettings":{"description":"List of report settings attached to this recurring report","type":"array","items":{"type":"object"}}},"required":["id","accountProductId","target","isActive","llms","languages","createdAt","updatedAt"]},"ReportSettingsItemDto":{"type":"object","properties":{"id":{"type":"string"},"recurringReportId":{"type":"string"},"productName":{"type":"string","example":"Doliprane"},"name":{"type":"string","example":"Doliprane EU"},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"competitorNames":{"type":"array","items":{"type":"string"}},"indications":{"type":"array","items":{"type":"string"}},"productNames":{"type":"object","description":"Per-language product name variations","additionalProperties":{"type":"array","items":{"type":"string"}}},"customQuestions":{"type":"object","description":"Custom questions split per audience","properties":{"patient":{"type":"array","items":{"type":"string"}},"professional":{"type":"array","items":{"type":"string"}},"competitor":{"type":"array","items":{"type":"string"}}}},"trackedTerms":{"description":"Keywords/phrases to track mention rate in LLM answers","type":"array","items":{"type":"string"}},"ownedDomains":{"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"markets":{"description":"Marchés régionaux effectifs — **toujours présent, jamais `null`**. Quand la configuration n’en porte pas, la valeur publiée est celle qui s’applique réellement : accountProduct.defaultMarket, sinon la région d’origine (`eu`). Les `languages` de ces entrées font autorité sur la couverture linguistique, et le champ `languages` racine en est l’union — les deux ne peuvent pas diverger.","items":{"type":"array"},"type":"array"}},"required":["id","recurringReportId","productName","name","languages","llms","createdAt","updatedAt","markets"]},"EvolutionTermPointDto":{"type":"object","properties":{"term":{"type":"string","example":"mechanism of action"},"mentionRate":{"type":"number","example":0.25,"description":"Share of answers containing the term (0–1)"},"mentionCount":{"type":"number","example":12},"totalAnswers":{"type":"number","example":48}},"required":["term","mentionRate","mentionCount","totalAnswers"]},"EvolutionTopSourceDto":{"type":"object","properties":{"title":{"type":"string","example":"EMA Summary of Product Characteristics"},"domain":{"type":"string","example":"ema.europa.eu"},"link":{"type":"string","example":"https://www.ema.europa.eu/..."},"type":{"type":"string","example":"Regulatory"},"ranking":{"type":"number","example":14,"description":"Citation count on this run — the ranking key"},"reliability":{"type":"number","example":88,"description":"0–100"},"llmNames":{"example":["OpenAI","Claude"],"type":"array","items":{"type":"string"}},"languages":{"example":["fr"],"type":"array","items":{"type":"string"}}},"required":["title","domain","link","type","ranking","reliability","llmNames","languages"]},"RecurringBrandEvolutionPointDto":{"type":"object","properties":{"reportId":{"type":"string","example":"a1b2c3d4-..."},"createdAt":{"type":"string","example":"2026-04-22T00:00:00.000Z"},"questionCount":{"type":"number","example":40,"description":"Trending questions of this run, every language — same value as the unfiltered `/summary` `counts.trendingQuestions`. Never affected by the llm / language / market / category / tags filters."},"avgScore":{"type":"number","example":72},"avgReliability":{"type":"number","example":85},"totalQuestions":{"type":"number","example":120},"netSentimentScore":{"type":"number","example":15},"citationFrequency":{"type":"number","example":0.42},"aiVisibilityScore":{"type":"number","example":0.55},"positiveCount":{"type":"number","example":40},"negativeCount":{"type":"number","example":10},"neutralCount":{"type":"number","example":70},"terms":{"description":"Per tracked term mention rate for this report run","type":"array","items":{"$ref":"#/components/schemas/EvolutionTermPointDto"}},"topSources":{"description":"Source ranking as it stood on this run, desc by ranking, capped at 50. Same shape as the agnostic evolution topSources. Honours the language / llm / category filters; tags are not applied (tags live on questions, the stored source entry keeps only the first one).","type":"array","items":{"$ref":"#/components/schemas/EvolutionTopSourceDto"}}},"required":["reportId","createdAt","questionCount"]},"RecurringBrandEvolutionResponseDto":{"type":"object","properties":{"evolution":{"type":"array","items":{"$ref":"#/components/schemas/RecurringBrandEvolutionPointDto"}}},"required":["evolution"]},"RecurringBrandHistoryResponseDto":{"type":"object","properties":{"generatedReports":{"type":"array","items":{"type":"object"},"description":"List of generated reports for this recurring brand (slim shape: id, title, status, createdAt, ...). Use modular endpoints for full content."},"pagination":{"type":"object","description":"Present only when `limit` or `cursor` is passed (opt-in pagination).","example":{"limit":20,"hasMore":true,"nextCursor":"eyJjIjoiMjAyNi0wOS0wMVQwMDowMDowMC4wMDBaIiwiaSI6InJ1bi0yMCJ9"}}},"required":["generatedReports"]},"RecurringBrandListLastReportDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","title","createdAt"]},"RecurringBrandListActiveSettingsDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"productName":{"type":"string"}},"required":["id","name","productName"]},"RecurringBrandListItemDto":{"type":"object","properties":{"id":{"type":"string"},"target":{"type":"string"},"indications":{"nullable":true,"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"recurrenceType":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastReport":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/RecurringBrandListLastReportDto"}]},"totalReports":{"type":"number","example":12},"activeReportSettings":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/RecurringBrandListActiveSettingsDto"}]}},"required":["id","target","isActive","createdAt","updatedAt","lastReport","totalReports","activeReportSettings"]},"PaginatedRecurringBrandListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringBrandListItemDto"}},"meta":{"type":"object","description":"Pagination metadata","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"pages":{"type":"number"}}}},"required":["data","meta"]},"TrendingQuestionsLanguageGroupDto":{"type":"object","properties":{"language":{"type":"string","example":"fr"},"trending_questions":{"type":"array","items":{"$ref":"#/components/schemas/TrendingQuestionItemDto"}}},"required":["language","trending_questions"]},"CustomQuestionsDto":{"type":"object","properties":{"patient":{"example":["Question patient 1?",{"question":"Question patient 2?","tags":["safety"]}],"description":"Questions for patients. Each item can be a plain string or { question: string, tags?: string[] }.","type":"array","items":{"type":"array"}},"professional":{"example":["Question pro 1?",{"question":"Question pro 2?","tags":["efficacy"]}],"description":"Questions for professionals. Each item can be a plain string or { question: string, tags?: string[] }.","type":"array","items":{"type":"array"}},"payer":{"example":["Question payer 1?",{"question":"Question payer 2?","tags":["reimbursement"]}],"description":"Questions for payers / market access (cost-effectiveness, budget impact, reimbursement, formulary). Each item can be a plain string or { question: string, tags?: string[] }.","type":"array","items":{"type":"array"}},"competitor":{"example":["Question competitor 1?",{"question":"Question competitor 2?","tags":["pricing"]}],"description":"Questions about competitors. Each item can be a plain string or { question: string, tags?: string[] }.","type":"array","items":{"type":"array"}},"discoverability":{"type":"string","example":"A clinician asks about treatment options for women with infertility and low LH levels. What options are mentioned?","description":"Optional custom prompt for the Discoverability test in the Medical & Regulatory section"}}},"MarketEntryDto":{"type":"object","properties":{"market":{"type":"string","example":"us","description":"Market code","enum":["us","ca","gb","fr","de","es","it","jp","eu"]},"languages":{"type":"array","example":["fr","es"],"description":"Languages for this market","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}}},"required":["market","languages"]},"BrandPersonaAssignmentDto":{"type":"object","properties":{"questionText":{"type":"string","description":"Text of a custom question to replay per persona"},"personaIds":{"description":"Persona ids to replay this question for","type":"array","items":{"type":"string"}}},"required":["questionText","personaIds"]},"CreateModularBrandDto":{"type":"object","properties":{"target":{"type":"string","example":"Doliprane","description":"Product/brand name to analyze"},"productNames":{"type":"object","example":{"fr":["Doliprane","Paracétamol"],"en":["Tylenol","Acetaminophen"]},"description":"Product name variations per language (optional). Format: { [language]: string[] }"},"languages":{"type":"array","example":["fr","en"],"description":"Languages for the report. Supported: en, fr, de, es, it, pt, zh, ja, ko, ar","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}},"competitors":{"example":["Aspirin","Ibuprofen"],"description":"List of competitors (optional)","type":"array","items":{"type":"array"}},"competitorNames":{"type":"object","example":{"fr":{"Aspirin":"Aspirine","Ibuprofen":"Ibuprofène"},"en":{"Aspirin":"Aspirin","Ibuprofen":"Ibuprofen"}},"description":"Competitor name variant per language (one per language, used in prompts). Format: { [language]: { [competitorCanonical]: string } }"},"indications":{"example":["Pain","Fever"],"description":"List of indications (optional)","type":"array","items":{"type":"array"}},"llms":{"type":"array","example":["OpenAI","Claude"],"description":"LLMs to use for analysis. Supported: OpenAI, Perplexity, Claude, Gemini, Mistral, Grok, GoogleAIO (Google AI Overviews) and GoogleAIMode (Google AI Mode), both requiring the AI Overviews option and at least one LLM. Default: OpenAI, Perplexity","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"custom_questions":{"description":"Custom questions by category (optional)","allOf":[{"$ref":"#/components/schemas/CustomQuestionsDto"}]},"answer_len_words":{"type":"number","example":200,"description":"Answer length in words (optional). Default: 120"},"markets":{"description":"Regional markets [{ market, languages }]. When set, answer generation is routed per market to its regional micro-service and answers are tagged with the market. Empty → accountProduct.defaultMarket (or local).","type":"array","items":{"$ref":"#/components/schemas/MarketEntryDto"}},"ownedDomains":{"example":["sanofi.com","product.sanofi.com"],"description":"Proprietary domains to track citation frequency (optional)","type":"array","items":{"type":"array"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Market codes (e.g. \"fr\", \"us\") where the product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"metadata":{"type":"object","example":{"campaign":"Q1-2025","source":"api"},"description":"Optional client-defined metadata (arbitrary key-value object). Stored as-is and returned on the report."},"recurringReportId":{"type":"string","example":"uuid-of-recurring-report","description":"ID of an existing RecurringReport to link this report to. If provided, skips auto-creation of recurring report."},"personaAssignments":{"description":"WS3 — per custom question, which personas to replay it for (max 3 distinct).","type":"array","items":{"$ref":"#/components/schemas/BrandPersonaAssignmentDto"}}},"required":["target"]},"ApiErrorResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":400,"description":"HTTP status code"},"message":{"type":"object","example":"Validation failed","description":"Human-readable error message (or array for validation errors)"},"error":{"type":"string","example":"Bad Request","description":"NestJS error class name (HTTP status text)"}},"required":["statusCode","message"]},"SuccessResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true,"description":"Operation success flag"}},"required":["success"]},"TrendingExcludeQuestionsBrandDto":{"type":"object","properties":{"patient":{"description":"Patient questions to exclude from generation","maxItems":500,"type":"array","items":{"type":"string"}},"professional":{"description":"Professional questions to exclude from generation","maxItems":500,"type":"array","items":{"type":"string"}},"payer":{"description":"Payer questions to exclude from generation","maxItems":500,"type":"array","items":{"type":"string"}},"competitor":{"description":"Competitor questions to exclude from generation","maxItems":500,"type":"array","items":{"type":"string"}}}},"BrandTrendingQuestionsBodyDto":{"type":"object","properties":{"product":{"type":"string","example":"Doliprane","description":"Product name to analyze"},"languages":{"example":["fr","en"],"description":"Language codes for trending generation","type":"array","items":{"type":"string"}},"excludeQuestions":{"$ref":"#/components/schemas/TrendingExcludeQuestionsBrandDto"},"indications":{"example":["Atopic Dermatitis","Fertility"],"description":"Therapeutic areas / indications to focus trending questions","type":"array","items":{"type":"string"}},"llm":{"type":"string","example":"Perplexity","description":"Override TRENDING_LLM: Perplexity or OpenAI"}},"required":["product"]},"CreateRecurringBrandDto":{"type":"object","properties":{"target":{"type":"string","example":"Doliprane","description":"Product/brand name"},"indications":{"example":["Atopic Dermatitis","Asthma"],"description":"Therapeutic indications to scope this recurring report. Omit or empty array for unscoped (legacy behavior). Max 10.","type":"array","items":{"type":"array"}},"isActive":{"type":"boolean","example":false,"description":"Activate recurring report (default false)"},"recurrenceType":{"type":"string","example":"WEEKLY","description":"Recurrence type","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"metadata":{"type":"object","example":{"campaign":"Q1-2026","source":"api"},"description":"Optional client-defined metadata (arbitrary key-value object). Stored on the recurring report."}},"required":["target"]},"UpdateRecurringBrandStatusDto":{"type":"object","properties":{"isActive":{"type":"boolean","example":true,"description":"Active/inactive status of the recurring report"}},"required":["isActive"]},"UpdateRecurringBrandSettingsCustomQuestionsDto":{"type":"object","properties":{}},"UpdateRecurringBrandSettingsDto":{"type":"object","properties":{"name":{"type":"string","example":"Config – US","description":"Setting name (optional)"},"llms":{"example":["OpenAI","Claude"],"description":"LLMs to use (optional)","type":"array","items":{"type":"array"}},"languages":{"example":["fr","en"],"description":"Languages (optional)","type":"array","items":{"type":"array"}},"recurrenceType":{"type":"string","example":"MONTHLY","description":"Recurrence type","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"nextRunAt":{"type":"string","example":"2026-06-15T09:00:00.000Z","description":"Next run date (optional). Only valid when recurrenceType is provided. If omitted, next run is calculated automatically."},"competitors":{"example":["Aspirin","Ibuprofen"],"description":"Competitors (optional)","type":"array","items":{"type":"array"}},"competitorNames":{"type":"object","example":{"fr":{"Aspirin":"Aspirine"},"en":{"Aspirin":"Aspirin"}},"description":"Competitor name variant per language (optional)"},"indications":{"example":["Pain","Fever"],"description":"Indications (optional)","type":"array","items":{"type":"array"}},"productNames":{"type":"object","example":{"fr":["Doliprane"],"en":["Tylenol"]},"description":"Product name variations per language (optional)"},"customQuestions":{"description":"Custom questions (optional)","allOf":[{"$ref":"#/components/schemas/UpdateRecurringBrandSettingsCustomQuestionsDto"}]},"ownedDomains":{"example":["sanofi.com"],"description":"Owned domains (optional)","type":"array","items":{"type":"array"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Market codes (e.g. \"fr\", \"us\") where the product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"alertThreshold":{"type":"object","example":30,"description":"Alert threshold 0-100 or null (optional)"},"activeReportSettingsId":{"type":"string","description":"ReportSettings id to use for recurring runs (optional)"},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Tableau vide → efface la configuration régionale et rend la main à accountProduct.defaultMarket.","items":{"type":"array"},"type":"array"},"metadata":{"type":"object","example":{"campaign":"Q1-2026","source":"api"},"description":"Optional client-defined metadata on the recurring report (arbitrary key-value object)."}}},"CreateReportSettingsDto":{"type":"object","properties":{"productName":{"type":"string","example":"Doliprane","description":"Product name (immutable after creation)"},"name":{"type":"string","example":"Doliprane – US"},"languages":{"example":["en","fr"],"deprecated":true,"description":"DÉPRÉCIÉ — `markets` fait autorité sur la couverture linguistique. Facultatif dès lors que `markets` est fourni : les langues sont alors l'union de celles de chaque marché. Conservé pour les intégrations qui ne configurent pas encore de marché ; retiré à la prochaine version d’API. En lecture, ce champ renvoie toujours l'union des langues des marchés, donc les deux ne peuvent plus diverger.","type":"array","items":{"type":"array"}},"llms":{"example":["OpenAi","Claude"],"type":"array","items":{"type":"array"}},"competitors":{"example":["Aspirin"],"type":"array","items":{"type":"array"}},"competitorNames":{"type":"object","example":{"fr":{"Aspirin":"Aspirine"},"en":{"Aspirin":"Aspirin"}},"description":"Competitor name variant per language (one per language, used in prompts). Format: { [language]: { [competitorCanonical]: string } }"},"indications":{"example":["Pain"],"type":"array","items":{"type":"array"}},"productNames":{"type":"object","example":{"fr":["Doliprane"],"en":["Tylenol"]},"description":"Product name variations per language"},"customQuestions":{"$ref":"#/components/schemas/CustomQuestionsDto"},"ownedDomains":{"example":["sanofi.com"],"type":"array","items":{"type":"array"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Market codes (e.g. \"fr\", \"us\") where the product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"alertThreshold":{"type":"object","example":30,"description":"Underperform rate threshold (0-100) for competitive alerts. null = no alerts."},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Vide → accountProduct.defaultMarket, sinon génération locale.","items":{"type":"array"},"type":"array"}},"required":["productName","llms"]},"SetActiveReportSettingsDto":{"type":"object","properties":{"activeReportSettingsId":{"type":"string","example":"uuid","description":"ReportSettings id to set as active"}},"required":["activeReportSettingsId"]},"ParseQuestionsBodyDto":{"type":"object","properties":{"lines":{"description":"List of question strings to classify (e.g. from CSV or paste). Max 500 lines.","example":["What are the side effects of X?","How does X compare to Y?"],"maxItems":500,"type":"array","items":{"type":"string"}}},"required":["lines"]},"UpdateReportSettingsDto":{"type":"object","properties":{"name":{"type":"string","example":"Doliprane – US"},"languages":{"example":["en","fr"],"type":"array","items":{"type":"array"}},"llms":{"example":["OpenAi","Claude"],"type":"array","items":{"type":"array"}},"competitors":{"example":["Aspirin"],"type":"array","items":{"type":"array"}},"competitorNames":{"type":"object","example":{"fr":{"Aspirin":"Aspirine"},"en":{"Aspirin":"Aspirin"}},"description":"Competitor name variant per language (one per language, used in prompts). Format: { [language]: { [competitorCanonical]: string } }"},"indications":{"example":["Pain"],"type":"array","items":{"type":"array"}},"productNames":{"type":"object"},"customQuestions":{"$ref":"#/components/schemas/CustomQuestionsDto"},"ownedDomains":{"example":["sanofi.com"],"type":"array","items":{"type":"array"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Market codes (e.g. \"fr\", \"us\") where the product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"alertThreshold":{"type":"object","example":30,"description":"Underperform rate threshold (0-100) for competitive alerts. null = no alerts."},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Vide → accountProduct.defaultMarket, sinon génération locale.","items":{"type":"array"},"type":"array"}}},"V2MarketDto":{"type":"object","properties":{"code":{"type":"string","example":"fr","enum":["us","ca","gb","fr","de","es","it","jp"],"description":"Market code: one country, lowercase. Questions for this market are asked from a server in the country"},"iso":{"type":"string","example":"FR","description":"ISO 3166-1 alpha-2 code of the country"}},"required":["code","iso"]},"V2MarketsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V2MarketDto"}}},"required":["data"]},"RegisterDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"User email address"},"password":{"type":"string","example":"tulipe orage clavier minuit","description":"At least 12 characters, at most 72 UTF-8 bytes; must not contain the email, the name, \"pharmageo\" or \"aikka\"; checked for guessability (zxcvbn) and known breaches (Have I Been Pwned). Refusal: 400 { code: \"PASSWORD_POLICY\", issues: [...], message }.","minLength":12},"name":{"type":"string","example":"John Doe","description":"User full name"},"language":{"type":"string","example":"fr","description":"Preferred language for transactional emails (fr|en)"},"recaptchaToken":{"type":"string","description":"Google reCAPTCHA v3 token for the \"signup\" action. Required when captcha verification is enabled on the server."}},"required":["email","password","name"]},"RegisterResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"b3b2a3e2-c5b3-4a6c-9b3a-7e8f1c2d3e4f"},"email":{"type":"string","example":"demo@aikka.io"},"name":{"type":"string","example":"Jane Doe"},"accountId":{"type":"string","example":"a1b2c3d4-...","description":"Account ID (omitted on resend-confirmation path)"},"accountName":{"type":"string","example":"Aikka Demo"},"role":{"type":"string","description":"PharmaGeo plan assigned to the AccountProduct (FREE on registration)","enum":["FREE","STARTER","PRO","MAX","ENTERPRISE"],"example":"FREE"},"credits":{"type":"number","example":100},"questionsUsed":{"type":"number","example":0},"lastReset":{"type":"string","example":"2026-04-01T00:00:00.000Z","description":"ISO timestamp of last credit reset"},"emailConfirmed":{"type":"boolean","example":false,"description":"Whether the email has been confirmed"},"message":{"type":"string","example":"Compte créé avec succès. Veuillez confirmer votre email.","description":"Human-readable message (registration outcome)"}},"required":["id","email","name","emailConfirmed","message"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"User email address"},"password":{"type":"string","example":"password123","description":"User password"}},"required":["email","password"]},"LoginUserDto":{"type":"object","properties":{"id":{"type":"string","example":"b3b2a3e2-c5b3-4a6c-9b3a-7e8f1c2d3e4f"},"email":{"type":"string","example":"demo@aikka.io"},"name":{"type":"string","example":"Jane Doe"},"role":{"type":"string","example":"STARTER","description":"PharmaGeo plan (FREE | STARTER | PRO | MAX | ENTERPRISE)","enum":["FREE","STARTER","PRO","MAX","ENTERPRISE"]},"credits":{"type":"number","example":100,"description":"Remaining credits on the AccountProduct"},"questionsUsed":{"type":"number","example":12,"description":"Number of questions consumed since last reset"},"lastReset":{"type":"string","example":"2026-04-01T00:00:00.000Z","description":"ISO timestamp of last credit reset"}},"required":["id","email","name","role","credits","questionsUsed","lastReset"]},"LoginAccountDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"Aikka Demo"},"role":{"type":"string","example":"PRODUCT_ADMIN","description":"User role on the AccountProduct","enum":["PRODUCT_ADMIN","EDITOR","VIEWER"]}},"required":["id","name","role"]},"LoginProductDto":{"type":"object","properties":{"slug":{"type":"string","example":"pharma-geo"},"name":{"type":"string","example":"PharmaGeo"},"plan":{"type":"object","example":"STARTER","description":"AccountProduct.plan (legacy field, may differ from pharmaGeoPlan)","nullable":true}},"required":["slug","name"]},"LoginResponseDto":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT access token. Use as `Authorization: Bearer <token>` header.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"user":{"$ref":"#/components/schemas/LoginUserDto"},"account":{"$ref":"#/components/schemas/LoginAccountDto"},"product":{"$ref":"#/components/schemas/LoginProductDto"}},"required":["access_token","user","account","product"]},"GoogleLoginDto":{"type":"object","properties":{"credential":{"type":"string","example":"eyJhbGciOiJSUzI1NiIsImtpZCI6...","description":"Google ID token (JWT credential) returned by Google Identity Services"}},"required":["credential"]},"ConfirmEmailDto":{"type":"object","properties":{"token":{"type":"string","example":"abc123token456","description":"Confirmation token received by email"},"password":{"type":"string","description":"Password chosen at sign-up"}},"required":["token","password"]},"ConfirmEmailResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Email confirmé avec succès"}},"required":["success","message"]},"ResendConfirmationDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"Email address to resend confirmation"}},"required":["email"]},"ResendConfirmationResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Email de confirmation renvoyé"}},"required":["success","message"]},"CheckEmailStatusDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"Email address to check"}},"required":["email"]},"CheckEmailStatusResponseDto":{"type":"object","properties":{"emailConfirmed":{"type":"boolean","example":false,"description":"Whether the user has confirmed their email"},"hasValidToken":{"type":"object","example":true,"description":"Whether the existing confirmation token is still valid (not expired)"}},"required":["emailConfirmed","hasValidToken"]},"ForgotPasswordDto":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com","description":"Email address for password reset"}},"required":["email"]},"ForgotPasswordResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Un email de réinitialisation a été envoyé"}},"required":["success","message"]},"VerifyResetTokenDto":{"type":"object","properties":{"token":{"type":"string","example":"reset-token-123","description":"Password reset token received by email"}},"required":["token"]},"VerifyResetTokenResponseDto":{"type":"object","properties":{"valid":{"type":"boolean","example":true,"description":"Whether the reset token is valid and not expired"},"email":{"type":"string","example":"demo@aikka.io","description":"Email associated with the token (when valid)"}},"required":["valid"]},"ResetPasswordDto":{"type":"object","properties":{"token":{"type":"string","example":"reset-token-123","description":"Password reset token"},"newPassword":{"type":"string","example":"tulipe orage clavier minuit","description":"At least 12 characters, at most 72 UTF-8 bytes; must not contain the email, the name, \"pharmageo\" or \"aikka\"; checked for guessability (zxcvbn) and known breaches (Have I Been Pwned). Refusal: 400 { code: \"PASSWORD_POLICY\", issues: [...], message }.","minLength":12}},"required":["token","newPassword"]},"ResetPasswordResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Mot de passe réinitialisé avec succès"}},"required":["success","message"]},"AccountInfoUserSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"userProductRoles":{"type":"array","description":"List of roles attached to this user via UserProductRole","items":{"type":"object"}}},"required":["id","email","name","userProductRoles"]},"AccountSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountType":{"type":"string","enum":["INDIVIDUAL","ENTERPRISE"],"description":"Account type — drives license management visibility"},"users":{"description":"Users that belong to this account","type":"array","items":{"$ref":"#/components/schemas/AccountInfoUserSummaryDto"}}},"required":["id","name","accountType","users"]},"AccountInfoResponseDto":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/AccountSummaryDto"},"isAdmin":{"type":"boolean","example":true,"description":"Whether the current user is PRODUCT_ADMIN of pharma-geo"},"canManageLicenses":{"type":"boolean","example":false,"description":"True only when the account is ENTERPRISE and the user is admin (license seats UI gate)"}},"required":["account","isAdmin","canManageLicenses"]},"CreateApiKeyDto":{"type":"object","properties":{"name":{"type":"string","example":"My API Key","description":"API key name"},"accountProductId":{"type":"string","example":"prod-123","description":"Associated product ID (optional)"},"expiresAt":{"type":"string","example":"2025-12-31T23:59:59Z","description":"Expiration date (optional)"}},"required":["name"]},"ApiKeyCreatedResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"key":{"type":"string","example":"phg_sk_8gId5YHvU7AJkDA6WO2U4dXqc3Kh68g2HRtf1CXJ3Lk","description":"Plaintext API key. Returned ONLY at creation — store it securely; PharmaGeo does not keep a recoverable copy."},"name":{"type":"string","example":"CI integration key"},"createdAt":{"format":"date-time","type":"string","example":"2026-04-30T12:00:00.000Z"},"expiresAt":{"type":"object","example":"2027-04-30T12:00:00.000Z","nullable":true,"description":"Expiry timestamp (null if no expiry was set)"}},"required":["id","key","name","createdAt"]},"ApiKeyProductSummaryDto":{"type":"object","properties":{"slug":{"type":"string","example":"pharma-geo"},"name":{"type":"string","example":"PharmaGeo"}},"required":["slug","name"]},"ApiKeyAccountProductSummaryDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"product":{"$ref":"#/components/schemas/ApiKeyProductSummaryDto"}},"required":["id","product"]},"ApiKeyListItemDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"CI integration key"},"isActive":{"type":"boolean","example":true},"lastUsedAt":{"type":"object","nullable":true,"description":"Last time this key was used to authenticate"},"expiresAt":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"},"accountProductId":{"type":"object","nullable":true,"description":"AccountProduct this key is scoped to (if any)"},"accountProduct":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiKeyAccountProductSummaryDto"}]}},"required":["id","name","isActive","createdAt"]},"DeleteApiKeyDto":{"type":"object","properties":{"id":{"type":"string","example":"key-123","description":"API key ID to delete"}},"required":["id"]},"ApiKeyOperationResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"RevokeApiKeyDto":{"type":"object","properties":{"id":{"type":"string","example":"key-123","description":"API key ID to revoke"}},"required":["id"]},"ToggleApiKeyStatusDto":{"type":"object","properties":{"id":{"type":"string","example":"key-123","description":"API key ID"},"isActive":{"type":"boolean","example":true,"description":"Active/inactive status of the API key"}},"required":["id","isActive"]},"ApiKeyToggleResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true,"description":"New active status after toggle"}},"required":["success","isActive"]},"SyncAiOverviewsResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"AI Overviews synced successfully"},"synced":{"type":"number","example":12,"description":"Number of queries that were synced"}},"required":["success","message","synced"]},"RetryPendingSnapshotsResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Pending snapshots retry completed"},"retried":{"type":"number","example":0,"description":"Number of pending snapshots that were retried in this run"}},"required":["success","message","retried"]},"AiOverviewYouTubeCitationDto":{"type":"object","properties":{"videoId":{"type":"string"},"videoTitle":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"},"videoUrl":{"type":"string"},"thumbnailUrl":{"type":"string"},"engagement":{"type":"object","description":"Engagement metrics returned by the upstream provider (counts, durations, ...)","additionalProperties":true},"publishedAt":{"format":"date-time","type":"string"},"citationPosition":{"type":"number"},"context":{"type":"string"}},"required":["videoId","videoTitle","channelId","channelName"]},"AiOverviewMetricsDto":{"type":"object","properties":{"impressionCount":{"type":"number"},"clickCount":{"type":"number"},"ctr":{"type":"number"},"position":{"type":"number"}}},"AiOverviewItemDto":{"type":"object","properties":{"query":{"type":"string","example":"asthma symptoms","description":"Search query that produced this overview"},"queryLanguage":{"type":"string","example":"en"},"market":{"type":"string","example":"FR"},"hasAiOverview":{"type":"boolean","example":true},"overviewText":{"type":"string","description":"Plain-text overview body when available"},"overviewDate":{"format":"date-time","type":"string"},"youtubeCitations":{"type":"array","items":{"$ref":"#/components/schemas/AiOverviewYouTubeCitationDto"}},"metrics":{"$ref":"#/components/schemas/AiOverviewMetricsDto"}},"required":["query","queryLanguage","hasAiOverview","overviewDate","youtubeCitations","metrics"]},"YouTubeChannelMetricVideoDto":{"type":"object","properties":{"videoId":{"type":"string"},"videoTitle":{"type":"string"},"citationCount":{"type":"number","example":12},"viewCount":{"type":"number","example":124000}},"required":["videoId","videoTitle","citationCount"]},"YouTubeChannelMetricsDto":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":"string"},"totalCitations":{"type":"number","example":32,"description":"Total citations of this channel across the matching overviews"},"videos":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeChannelMetricVideoDto"}}},"required":["channelId","channelName","totalCitations","videos"]},"SyncAiOverviewsDto":{"type":"object","properties":{"queries":{"example":["drug X efficacy"],"description":"Search queries to sync","type":"array","items":{"type":"string"}},"reportId":{"type":"string","example":"rep-uuid","description":"Brand report id"},"agnosticReportId":{"type":"string","example":"rep-uuid","description":"Agnostic report id"},"pathology":{"type":"string","example":"Diabetes","description":"Pathology for agnostic context"},"language":{"type":"string","example":"en","description":"Language code"},"market":{"type":"string","example":"FR","description":"Market code"}}},"WebhookReportCompletedPayloadDto":{"type":"object","properties":{"event":{"type":"string","enum":["report.completed","agnostic_report.completed","merged_report.completed"],"example":"merged_report.completed"},"reportId":{"type":"string","example":"7f9c2a4e-1b2c-4d3e-9f00-1a2b3c4d5e6f","description":"Report that ended; read it with GET /v2/reports/:id"},"reportType":{"type":"string","enum":["brand","agnostic","merged"],"example":"merged"},"timestamp":{"type":"string","example":"2026-11-20T10:05:30.000Z","description":"When the event was sent"},"title":{"type":"string","example":"Atopic dermatitis — Dupixent"},"seriesId":{"type":"string","nullable":true,"example":"1c2d3e4f-5a6b-7c8d-9e0f-a1b2c3d4e5f6","description":"merged_report.completed only: series the run belongs to, null for a one-off report"},"kind":{"type":"string","enum":["merged"],"example":"merged","description":"merged_report.completed only: report family, as in the V2 API"},"status":{"type":"string","enum":["done","partial","error"],"example":"done","description":"merged_report.completed only, same value as status in GET /v2/reports/:id: done = complete; partial = usable but some answers or analyses are missing; error = nothing usable, the credits are refunded"}},"required":["event","reportId","reportType","timestamp"]},"CreateWebhookSubscriptionDto":{"type":"object","properties":{"url":{"type":"string","example":"https://api.example.com/webhooks/pharmageo","description":"Webhook URL (HTTPS required)"},"events":{"type":"array","example":["merged_report.completed"],"description":"Events to subscribe to: report.completed (brand), agnostic_report.completed (agnostic), merged_report.completed (merged, also sent when the run fails). See WebhookReportCompletedPayloadDto for the body.","items":{"type":"string","enum":["report.completed","agnostic_report.completed","merged_report.completed"]}},"secret":{"type":"string","example":"my-secret-for-hmac","description":"Optional secret for HMAC signature verification (X-PharmaGeo-Signature header)"},"description":{"type":"string","example":"Sanofi production","description":"Optional description for this webhook"}},"required":["url","events"]},"WebhookSubscriptionResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"url":{"type":"string","example":"https://api.example.com/webhooks/pharmageo"},"events":{"type":"array","example":["report.completed","agnostic_report.completed"],"items":{"type":"string","enum":["report.completed","agnostic_report.completed","merged_report.completed"]}},"isActive":{"type":"boolean","example":true},"description":{"type":"object","nullable":true,"description":"Description of the webhook (set at creation, may be edited later)"},"createdAt":{"format":"date-time","type":"string","description":"Present on list/getOne responses only (not returned by create/update)"}},"required":["id","url","events","isActive"]},"UpdateWebhookSubscriptionDto":{"type":"object","properties":{"url":{"type":"string","example":"https://api.example.com/webhooks/pharmageo","description":"Webhook URL (HTTPS required)"},"events":{"type":"array","example":["report.completed"],"description":"Events to subscribe to","items":{"type":"string","enum":["report.completed","agnostic_report.completed","merged_report.completed"]}},"secret":{"type":"string","example":"my-secret-for-hmac","description":"Optional secret for HMAC signature verification"},"description":{"type":"string","example":"Sanofi production","description":"Optional description for this webhook"},"isActive":{"type":"boolean","example":true,"description":"Whether the webhook is active"}}},"CreatePersonaDto":{"type":"object","properties":{"base":{"type":"string","enum":["patient","professional","payer"],"description":"Audience category the persona refines"},"name":{"type":"string","example":"Oncologue KOL early-adopter"},"indication":{"type":"string","example":"breast cancer"},"market":{"type":"string","example":"JP"},"languageHint":{"type":"string","example":"en"},"attributes":{"type":"object","description":"Behavioral attributes — HCPPersonaAttributes | PatientPersonaAttributes, validated against the Zod schema server-side. Its `base` must equal the persona base."}},"required":["base","name","attributes"]},"UpdatePersonaDto":{"type":"object","properties":{"name":{"type":"string","example":"Oncologue KOL early-adopter"},"indication":{"type":"string"},"market":{"type":"string"},"languageHint":{"type":"string"},"attributes":{"type":"object","description":"Updated behavioral attributes. Changing these creates a new persona version."}}},"BrandReportCountsDto":{"type":"object","properties":{"patientQuestions":{"type":"number","example":120},"professionalQuestions":{"type":"number","example":120},"payerQuestions":{"type":"number","example":120},"competitors":{"type":"number","example":5},"competitorQuestions":{"type":"number","example":60},"sources":{"type":"number","example":450},"recommendations":{"type":"object","example":{"geo":12,"aeo":8,"ownedDomain":3}},"cloudwords":{"type":"number","example":30},"overviews":{"type":"number","example":2},"medicalRegulatoryLanguages":{"type":"number","example":3},"trendingQuestionLanguages":{"type":"number","example":2},"trendingQuestions":{"type":"number","example":11,"description":"Total number of individual trending questions across all languages"}},"required":["patientQuestions","professionalQuestions","payerQuestions","competitors","competitorQuestions","sources","recommendations","cloudwords","overviews","medicalRegulatoryLanguages","trendingQuestionLanguages","trendingQuestions"]},"AppliedFiltersDto":{"type":"object","properties":{"llm":{"example":["OpenAI","Claude"],"description":"LLM filter, canonicalized. Empty when no filter was requested.","type":"array","items":{"type":"string"}},"language":{"example":["de","fr"],"description":"Language filter. Empty when no filter was requested.","type":"array","items":{"type":"string"}},"category":{"example":["patient","professional"],"description":"Audience category filter. Empty when no filter was requested.","type":"array","items":{"type":"string"}},"tags":{"example":["key-message-expressions|efficacy"],"description":"Tag filter, lowercased. Empty when no filter was requested.","type":"array","items":{"type":"string"}}},"required":["llm","language","category","tags"]},"IgnoredFiltersDto":{"type":"object","properties":{"llm":{"example":["Mistral"],"description":"Requested LLM values absent from this report; they did not restrict the result.","type":"array","items":{"type":"string"}},"language":{"example":["es"],"description":"Requested language values absent from this report; they did not restrict the result.","type":"array","items":{"type":"string"}}},"required":["llm","language"]},"FilterEchoDto":{"type":"object","properties":{"applied":{"$ref":"#/components/schemas/AppliedFiltersDto"},"ignored":{"$ref":"#/components/schemas/IgnoredFiltersDto"}},"required":["applied"]},"BrandReportSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"format":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"accountProductId":{"type":"string"},"recurringReportId":{"type":"object","nullable":true},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"productNames":{"type":"object"},"indications":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"counts":{"$ref":"#/components/schemas/BrandReportCountsDto"},"filters":{"description":"Echo of the filters as the API parsed them, plus any requested `llm`/`language` values this report does not contain. Ignored values did not restrict the counts above.","allOf":[{"$ref":"#/components/schemas/FilterEchoDto"}]}},"required":["id","title","status","format","createdAt","updatedAt","accountProductId","counts","filters"]},"BrandPatientQuestionListItemDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"}},"required":["questionKey","llm","language","question","hasSources","sourceCount"]},"CursorPageMetaDto":{"type":"object","properties":{"nextCursor":{"type":"object","nullable":true,"description":"Cursor to pass on the next call, or null if the last page has been reached."},"hasMore":{"type":"boolean","description":"True when more items can be fetched by passing nextCursor."},"total":{"type":"number","description":"Total number of items across all pages. Only present when includeTotal=true was passed."}},"required":["nextCursor","hasMore"]},"BrandPatientQuestionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandPatientQuestionListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandPatientQuestionDetailDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"},"answerOriginal":{"type":"string"},"answerEnglish":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}}},"required":["questionKey","llm","language","question","hasSources","sourceCount","answerOriginal","answerEnglish","sources"]},"BrandProfessionalQuestionListItemDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"},"index":{"type":"number","example":0,"description":"Index within the language block (0-based)"}},"required":["questionKey","llm","language","question","hasSources","sourceCount","index"]},"BrandProfessionalQuestionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandProfessionalQuestionListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandProfessionalQuestionDetailDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"},"answerOriginal":{"type":"string"},"answerEnglish":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"index":{"type":"number","example":0,"description":"Index within the language block (0-based)"}},"required":["questionKey","llm","language","question","hasSources","sourceCount","answerOriginal","answerEnglish","sources","index"]},"BrandCompetitorListItemDto":{"type":"object","properties":{"competitorKey":{"type":"string"},"competitorBrandName":{"type":"string"},"questionCount":{"type":"number"},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}}},"required":["competitorKey","competitorBrandName","questionCount","languages","llms"]},"BrandCompetitorsMetaDto":{"type":"object","properties":{"nextCursor":{"type":"object","nullable":true,"description":"Cursor to pass on the next call, or null if the last page has been reached."},"hasMore":{"type":"boolean","description":"True when more items can be fetched by passing nextCursor."},"total":{"type":"number","description":"Total number of items across all pages. Only present when includeTotal=true was passed."},"totalQuestions":{"type":"number","example":228,"description":"Total number of competitor questions across all competitors"}},"required":["nextCursor","hasMore","totalQuestions"]},"BrandCompetitorsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandCompetitorListItemDto"}},"meta":{"$ref":"#/components/schemas/BrandCompetitorsMetaDto"}},"required":["data","meta"]},"BrandCompetitorQuestionListItemDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"},"competitorKey":{"type":"string"},"competitorBrandName":{"type":"string"},"index":{"type":"number","example":0}},"required":["questionKey","llm","language","question","hasSources","sourceCount","competitorKey","competitorBrandName","index"]},"BrandCompetitorQuestionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandCompetitorQuestionListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandCompetitorQuestionDetailDto":{"type":"object","properties":{"questionKey":{"type":"string"},"llm":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"description":"Absent when notTriggered is true"},"score":{"type":"number","description":"Absent when notTriggered is true"},"reliability":{"type":"number","description":"Reliability score when present on stored question objects; omitted on some legacy reports and when notTriggered is true"},"notTriggered":{"type":"number","enum":[true],"description":"Google showed no AI answer for this question"},"hasSources":{"type":"boolean"},"sourceCount":{"type":"number"},"answerOriginal":{"type":"string"},"answerEnglish":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"competitorKey":{"type":"string"},"competitorBrandName":{"type":"string"},"index":{"type":"number","example":0}},"required":["questionKey","llm","language","question","hasSources","sourceCount","answerOriginal","answerEnglish","sources","competitorKey","competitorBrandName","index"]},"BrandSourceItemDto":{"type":"object","properties":{"llm":{"type":"string"},"language":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"type":{"type":"string"},"reliability":{"type":"number"},"domain":{"type":"string"},"usageCount":{"type":"number","example":3,"description":"Number of times this source was cited for this LLM in the report aggregate"}},"required":["llm","language","title","link","type"]},"BrandSourcesPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandSourceItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"CitationTopDomainDto":{"type":"object","properties":{"domain":{"type":"string","example":"en.wikipedia.org","description":"Host of the cited link without `www.`; subdomains stay distinct."},"citationCount":{"type":"number","example":2310},"citationRate":{"type":"number","example":0.0727,"description":"citationCount / total"},"sourceType":{"type":"object","example":"Guideline","nullable":true,"description":"Most cited source `type` in this domain (ties: alphabetical)."},"isOwned":{"type":"boolean","example":false,"description":"True when at least one cited link of this domain matches an owned URL."}},"required":["domain","citationCount","citationRate","sourceType","isOwned"]},"CitationBestOwnedDto":{"type":"object","properties":{"domain":{"type":"string","example":"sanofi.com"},"rank":{"type":"number","example":28,"description":"1-based position in the full domain ranking."},"citationCount":{"type":"number","example":540}},"required":["domain","rank","citationCount"]},"CitationTypeCountDto":{"type":"object","properties":{"type":{"type":"string","example":"Guideline","description":"Source `type` as stored on the citation. A citation without a type (missing or empty `type` on its /sources row) is counted under `Other`."},"citationCount":{"type":"number","example":8120},"citationRate":{"type":"number","example":0.101,"description":"citationCount / total"}},"required":["type","citationCount","citationRate"]},"CitationDomainRankDto":{"type":"object","properties":{"domain":{"type":"string","example":"en.wikipedia.org","description":"Host of the cited link without `www.`; subdomains stay distinct (the `domain` of /sources)."},"citationCount":{"type":"number","example":2310},"citationRate":{"type":"number","example":0.0727,"description":"citationCount / total"},"urlCount":{"type":"number","example":412,"description":"Distinct URLs of this domain (URL key: host lowercased without `www.`, trailing slash dropped, query kept, fragment dropped — the key that deduplicates /sources on a series)."},"sourceType":{"type":"object","example":"Guideline","nullable":true,"description":"Most cited source `type` in this domain (ties: alphabetical); null when none of its citations has a type."},"isOwned":{"type":"boolean","example":false,"description":"True when at least one cited link of this domain matches an owned URL."}},"required":["domain","citationCount","citationRate","urlCount","sourceType","isOwned"]},"CitationLlmDomainDto":{"type":"object","properties":{"domain":{"type":"string","example":"pubmed.ncbi.nlm.nih.gov"},"citationCount":{"type":"number","example":640,"description":"Citations of this domain by this LLM."},"urlCount":{"type":"number","example":512,"description":"Distinct URLs of this domain cited by this LLM."},"isOwned":{"type":"boolean","example":false,"description":"True when at least one link of this domain cited by this LLM matches an owned URL (the `isOwned` of `topDomains` with `llm=<this LLM>`)."}},"required":["domain","citationCount","urlCount","isOwned"]},"CitationLlmDomainsDto":{"type":"object","properties":{"llm":{"type":"string","example":"OpenAI","description":"LLM name as /sources exposes it in `llm`."},"citationCount":{"type":"number","example":21034,"description":"Citations by this LLM. The blocks sum to `total`."},"urlCount":{"type":"number","example":9120,"description":"Distinct URLs cited by this LLM."},"domainCount":{"type":"number","example":870,"description":"Distinct domains cited by this LLM, before the `llmDomainLimit` bound."},"domains":{"description":"Domains by citations of this LLM, then domain ascending; at most `llmDomainLimit` (default 10).","type":"array","items":{"$ref":"#/components/schemas/CitationLlmDomainDto"}}},"required":["llm","citationCount","urlCount","domainCount","domains"]},"CitationUrlDto":{"type":"object","properties":{"link":{"type":"string","example":"https://www.ncbi.nlm.nih.gov/books/NBK1234/","description":"The link as most often cited for this URL (ties: alphabetical)."},"title":{"type":"object","example":"Asthma — StatPearls","nullable":true,"description":"Most frequent non-empty title (ties: alphabetical); null when every citation of this URL has an empty title."},"domain":{"type":"string","example":"ncbi.nlm.nih.gov"},"type":{"type":"string","example":"PubMed","description":"Most frequent `type` among the citations of this URL (ties: alphabetical); `Other` for citations without a type, as in `byType`."},"citationCount":{"type":"number","example":37},"isOwned":{"type":"boolean","example":false,"description":"True when the link matches an owned URL (same rule as `ownedTotal`)."}},"required":["link","title","domain","type","citationCount","isOwned"]},"BrandCitationsSummaryDto":{"type":"object","properties":{"total":{"type":"number","example":4210,"description":"Number of citations, one citation being one row of /sources under the same filters (a link per LLM and per run, deduplicated across questions; `usageCount` is not unfolded) whose link parses as a URL. Denominator of every rate."},"ownedTotal":{"type":"number","example":96,"description":"Citations whose link matches an owned URL."},"ownedShare":{"type":"number","example":0.0228,"description":"ownedTotal / total (0 when total is 0)."},"domainCount":{"type":"number","example":812,"description":"Number of distinct domains."},"topDomains":{"description":"Top 10 domains by citations, then domain ascending.","type":"array","items":{"$ref":"#/components/schemas/CitationTopDomainDto"}},"bestOwned":{"nullable":true,"description":"First owned domain in the full ranking; null when none.","allOf":[{"$ref":"#/components/schemas/CitationBestOwnedDto"}]},"ownedUrls":{"description":"Owned URLs applied, as in generation: the active settings of the series (for the series id or one of its runs), or the run snapshot for a standalone run.","type":"array","items":{"type":"string"}},"urlCount":{"type":"number","example":3020,"description":"Number of distinct cited URLs (before the `urlLimit` bound of `topUrls`)."},"byType":{"description":"Citations by source `type`, every type present, by citations then type ascending. Sums to `total`.","type":"array","items":{"$ref":"#/components/schemas/CitationTypeCountDto"}},"domains":{"description":"Full domain ranking, same order as `topDomains` (citations, then domain ascending), with `urlCount`. Every domain unless `domainLimit` bounds it (default 100, up to 10000); complete (`domainCount` entries), it sums to `total`; its first 10 entries are `topDomains`.","type":"array","items":{"$ref":"#/components/schemas/CitationDomainRankDto"}},"topDomainsByLlm":{"description":"One block per LLM, by citations then LLM name: its citations, distinct URLs and domains, and its top domains (`llmDomainLimit`, default 10). The blocks sum to `total`.","type":"array","items":{"$ref":"#/components/schemas/CitationLlmDomainsDto"}},"topUrls":{"description":"Most cited URLs, by citations then link ascending; at most `urlLimit` (default 100). URLs are keyed like the /sources series deduplication.","type":"array","items":{"$ref":"#/components/schemas/CitationUrlDto"}}},"required":["total","ownedTotal","ownedShare","domainCount","topDomains","bestOwned","ownedUrls","urlCount","byType","domains","topDomainsByLlm","topUrls"]},"BrandSourcesSummaryResponseDto":{"type":"object","properties":{"citations":{"$ref":"#/components/schemas/BrandCitationsSummaryDto"}},"required":["citations"]},"BrandRecommendationListItemDto":{"type":"object","properties":{"recommendationKey":{"type":"string"},"type":{"type":"string","enum":["geo","aeo","owned-domain"]},"llm":{"type":"string"},"language":{"type":"string"},"market":{"type":"string","nullable":true,"example":"gb","description":"Market the recommendation was generated for: each (market, language) pair gets its own recommendations, so `en` in `us` and `en` in `gb` are distinct entries. Null on reports generated without markets."},"titleOriginal":{"type":"string"},"titleEnglish":{"type":"string"},"priority":{"type":"string","enum":["High","Med","Low"],"description":"Priority band as labelled by the generation (\"Medium\" is returned as Med). Absent when the recommendation carries none: never invented."},"priorityScore":{"type":"number","minimum":0,"maximum":100,"example":85,"description":"Priority score from 0 to 100, for ranking recommendations that share the same `priority` label. It never contradicts the label: High is always 70-100, Med 40-69, Low 10-39. Within its band, the score combines: feasibility for the company (40%: an action on its own website ranks first, then a third-party change through a legitimate route such as a submission or a disclosed edit request, and a direct change to third-party content last), how selective the LLM was with this label in its answer (30%: a High that is the only High of its list ranks above a High in a list where every action is High), the position of the recommendation in the LLM's list (20%), and how actionable it is (10%: concrete steps, a precise target, linked evidence). Deterministic, and independent of the filters of the request."},"weakAreaAddressed":{"type":"string"},"targetSource":{"type":"string"},"tags":{"example":["efficacy","safety"],"description":"Tags of the prompts whose answers cite one of the sources of this recommendation, in its market, language and AI engine (lowercase). Empty when it cites no source cited by a tagged prompt. Filter with `tags`.","type":"array","items":{"type":"string"}},"audiences":{"type":"array","example":["patient"],"description":"Audiences: the one set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources. Empty when there are none. Filter with `audience` (or `category=patient|professional|payer`).","items":{"type":"string","enum":["hcp","patient","payer"]}},"action":{"type":"object","additionalProperties":true,"description":"Full recommendation action object (shape depends on `type`)"}},"required":["recommendationKey","type","llm","language","market","titleOriginal","titleEnglish","priorityScore","weakAreaAddressed","targetSource","tags","audiences","action"]},"BrandRecommendationsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandRecommendationListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandRecommendationDetailDto":{"type":"object","properties":{"recommendationKey":{"type":"string"},"type":{"type":"string","enum":["geo","aeo","owned-domain"]},"llm":{"type":"string"},"language":{"type":"string"},"market":{"type":"string","nullable":true,"example":"gb","description":"Market the recommendation was generated for: each (market, language) pair gets its own recommendations, so `en` in `us` and `en` in `gb` are distinct entries. Null on reports generated without markets."},"titleOriginal":{"type":"string"},"titleEnglish":{"type":"string"},"priority":{"type":"string","enum":["High","Med","Low"],"description":"Priority band as labelled by the generation (\"Medium\" is returned as Med). Absent when the recommendation carries none: never invented."},"priorityScore":{"type":"number","minimum":0,"maximum":100,"example":85,"description":"Priority score from 0 to 100, for ranking recommendations that share the same `priority` label. It never contradicts the label: High is always 70-100, Med 40-69, Low 10-39. Within its band, the score combines: feasibility for the company (40%: an action on its own website ranks first, then a third-party change through a legitimate route such as a submission or a disclosed edit request, and a direct change to third-party content last), how selective the LLM was with this label in its answer (30%: a High that is the only High of its list ranks above a High in a list where every action is High), the position of the recommendation in the LLM's list (20%), and how actionable it is (10%: concrete steps, a precise target, linked evidence). Deterministic, and independent of the filters of the request."},"weakAreaAddressed":{"type":"string"},"targetSource":{"type":"string"},"tags":{"example":["efficacy","safety"],"description":"Tags of the prompts whose answers cite one of the sources of this recommendation, in its market, language and AI engine (lowercase). Empty when it cites no source cited by a tagged prompt. Filter with `tags`.","type":"array","items":{"type":"string"}},"audiences":{"type":"array","example":["patient"],"description":"Audiences: the one set by the recommendation standard when there is one, otherwise those of the prompts whose answers cite one of its sources. Empty when there are none. Filter with `audience` (or `category=patient|professional|payer`).","items":{"type":"string","enum":["hcp","patient","payer"]}},"action":{"type":"object","additionalProperties":true,"description":"Full recommendation action object (shape depends on `type`)"},"summaryOriginal":{"description":"Summary lines in the original language","type":"array","items":{"type":"string"}},"summaryEnglish":{"description":"Summary lines translated to English","type":"array","items":{"type":"string"}}},"required":["recommendationKey","type","llm","language","market","titleOriginal","titleEnglish","priorityScore","weakAreaAddressed","targetSource","tags","audiences","action","summaryOriginal","summaryEnglish"]},"BrandCloudwordItemDto":{"type":"object","properties":{"llm":{"type":"string"},"language":{"type":"string"},"word":{"type":"string","example":"sécurité"},"occurence":{"type":"string","example":"12","description":"Frequency of the word (kept as a string for legacy reasons)"}},"required":["llm","language","word","occurence"]},"BrandCloudwordsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandCloudwordItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandOverviewItemDto":{"type":"object","properties":{"llm":{"type":"string","example":"OpenAI"},"overview":{"type":"object","description":"OverviewData object (shape mirrors the modular brand types)","additionalProperties":true}},"required":["llm","overview"]},"BrandOverviewPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandOverviewItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"BrandTrendingQuestionsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Trending questions grouped by language"}},"required":["data"]},"BrandMedicalRegulatoryListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Medical regulatory analysis entries grouped by language"}},"required":["data"]},"BrandOwnedDomainAuditResponseDto":{"type":"object","properties":{"data":{"type":"object","description":"Owned domain audit object, or null when not available","nullable":true,"additionalProperties":true}}},"TermMentionMetricDto":{"type":"object","properties":{"term":{"type":"string","example":"mechanism of action"},"mentionCount":{"type":"number","example":12},"totalAnswers":{"type":"number","example":48},"mentionRate":{"type":"number","example":0.25,"description":"Share of answers containing the term (0–1)"}},"required":["term","mentionCount","totalAnswers","mentionRate"]},"TermMentionRatesByLanguageDto":{"type":"object","properties":{"language":{"type":"string","example":"en"},"terms":{"type":"array","items":{"$ref":"#/components/schemas/TermMentionMetricDto"}}},"required":["language","terms"]},"TermMentionRatesByLlmDto":{"type":"object","properties":{"llm":{"type":"string","example":"OpenAi"},"terms":{"type":"array","items":{"$ref":"#/components/schemas/TermMentionMetricDto"}}},"required":["llm","terms"]},"TermMentionRatesPayloadDto":{"type":"object","properties":{"aggregate":{"type":"array","items":{"$ref":"#/components/schemas/TermMentionMetricDto"}},"byLanguage":{"type":"array","items":{"$ref":"#/components/schemas/TermMentionRatesByLanguageDto"}},"byLlm":{"type":"array","items":{"$ref":"#/components/schemas/TermMentionRatesByLlmDto"}}},"required":["aggregate"]},"TermMentionRatesResponseDto":{"type":"object","properties":{"trackedTerms":{"example":["mechanism of action"],"type":"array","items":{"type":"string"}},"termMentionRates":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TermMentionRatesPayloadDto"}]}},"required":["trackedTerms"]},"AiSummaryReportRefDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["run","series"]},"date":{"type":"string","example":"2026-10-28","description":"Run date; for a series, the date of its last completed run."},"runCount":{"type":"number","example":6,"description":"Series: completed runs merged."}},"required":["id","title","kind","date"]},"AiSummaryScopeFiltersDto":{"type":"object","properties":{"engines":{"example":["OpenAI"],"type":"array","items":{"type":"string"}},"languages":{"example":["fr"],"type":"array","items":{"type":"string"}},"audience":{"example":["patient"],"type":"array","items":{"type":"string"}},"markets":{"example":["us"],"type":"array","items":{"type":"string"}},"tagged":{"type":"boolean","example":false,"description":"A tag filter is active (the tag values are in `filters.applied.tags`)."}},"required":["engines","languages","audience","markets","tagged"]},"AiSummaryScopeDto":{"type":"object","properties":{"questions":{"type":"number","example":120,"description":"Agnostic only: questions generated in the scope."},"answers":{"type":"number","example":720,"description":"Agnostic: answers collected. Brand: question × LLM pairs analysed (patient, professional, payer)."},"llms":{"example":["OpenAI","Claude"],"type":"array","items":{"type":"string"}},"languages":{"example":["fr","en"],"type":"array","items":{"type":"string"}},"filters":{"description":"Active filters; absent when no filter restricts the scope.","allOf":[{"$ref":"#/components/schemas/AiSummaryScopeFiltersDto"}]}},"required":["answers","llms","languages"]},"AiSummarySegmentDto":{"type":"object","properties":{"llm":{"type":"string","example":"OpenAI"},"language":{"type":"string","example":"fr"},"market":{"type":"string","example":"eu"}}},"AiSummaryMetricDto":{"type":"object","properties":{"key":{"type":"string","example":"groundingRate","description":"Stable metric key."},"label":{"type":"string","example":"Answers citing at least one source"},"value":{"type":"number","example":87.5},"unit":{"type":"string","enum":["pct","score","nss","count"],"description":"pct = percentage on a 0-100 scale (never a 0-1 ratio); score = out of 100; nss = net sentiment score (-100 to +100); count = number."},"segment":{"description":"Absent = the whole filtered scope.","allOf":[{"$ref":"#/components/schemas/AiSummarySegmentDto"}]}},"required":["key","label","value","unit"]},"AiSummaryEntityDto":{"type":"object","properties":{"name":{"type":"string","example":"Dupixent"},"isOwn":{"type":"boolean","description":"Tracked product (agnostic) or the brand of the report (brand)."},"rank":{"type":"number","example":2,"description":"Rank in the section ranking (agnostic: top products of /overview). Absent = not in the ranking."},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/AiSummaryMetricDto"}}},"required":["name","isOwn","metrics"]},"AiSummaryDomainDto":{"type":"object","properties":{"domain":{"type":"string","example":"has-sante.fr"},"citations":{"type":"number","example":42},"sharePct":{"type":"number","example":12.3,"description":"Share of the citations of the scope, 0-100."},"isOwned":{"type":"boolean"},"sourceType":{"type":"string","nullable":true,"example":"Regulatory"}},"required":["domain","citations","sharePct","isOwned","sourceType"]},"AiSummarySourceTypeDto":{"type":"object","properties":{"type":{"type":"string","example":"Guideline"},"citations":{"type":"number","example":80},"sharePct":{"type":"number","example":23.4}},"required":["type","citations","sharePct"]},"AiSummaryBestOwnedDto":{"type":"object","properties":{"domain":{"type":"string","example":"sanofi.fr"},"rank":{"type":"number","example":7},"citations":{"type":"number","example":12}},"required":["domain","rank","citations"]},"AiSummarySourcesDto":{"type":"object","properties":{"totalCitations":{"type":"number","example":340,"description":"`total` of /sources/summary for the same filters."},"ownedCitations":{"type":"number","example":12},"ownedSharePct":{"type":"number","example":3.5},"domainCount":{"type":"number","example":120},"topDomains":{"description":"Top 5 domains of /sources/summary.","type":"array","items":{"$ref":"#/components/schemas/AiSummaryDomainDto"}},"byType":{"description":"Top 5 source types.","type":"array","items":{"$ref":"#/components/schemas/AiSummarySourceTypeDto"}},"bestOwned":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AiSummaryBestOwnedDto"}]}},"required":["totalCitations","ownedCitations","ownedSharePct","domainCount","topDomains","byType","bestOwned"]},"AiSummaryRunRefDto":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","example":"2026-10-12"}},"required":["id","date"]},"AiSummaryChangeDto":{"type":"object","properties":{"key":{"type":"string","example":"shareOfVoice"},"label":{"type":"string","example":"Share of voice"},"unit":{"type":"string","enum":["pct","score","nss","count"]},"segment":{"$ref":"#/components/schemas/AiSummarySegmentDto"},"entity":{"type":"string","example":"Dupixent","description":"Product or competitor concerned."},"previous":{"type":"number","example":21.2},"current":{"type":"number","example":24.6},"delta":{"type":"number","example":3.4,"description":"current − previous, to one decimal (percentage points for a pct)."}},"required":["key","label","unit","previous","current","delta"]},"AiSummaryEvolutionDto":{"type":"object","properties":{"available":{"type":"boolean","description":"false when the report is not in a series or has no previous completed run."},"reason":{"type":"string","enum":["not-in-series","no-previous-run"]},"previousRun":{"$ref":"#/components/schemas/AiSummaryRunRefDto"},"currentRun":{"$ref":"#/components/schemas/AiSummaryRunRefDto"},"changes":{"description":"Changes between the two runs, same filters, largest first (tracked products first). Only metrics present in both runs.","type":"array","items":{"$ref":"#/components/schemas/AiSummaryChangeDto"}}},"required":["available"]},"AiSummaryFactsDto":{"type":"object","properties":{"family":{"type":"string","enum":["agnostic","brand","merged"]},"subject":{"type":"string","example":"Atopic dermatitis","description":"Disease area (agnostic) or brand(s) (brand)."},"report":{"$ref":"#/components/schemas/AiSummaryReportRefDto"},"scope":{"$ref":"#/components/schemas/AiSummaryScopeDto"},"visibility":{"description":"Visibility figures of /overview for the same filters.","type":"array","items":{"$ref":"#/components/schemas/AiSummaryMetricDto"}},"entities":{"description":"Agnostic: top products of /overview (+ tracked products outside it, without figures). Brand: competitors of /competitors.","type":"array","items":{"$ref":"#/components/schemas/AiSummaryEntityDto"}},"sources":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AiSummarySourcesDto"}]},"evolution":{"$ref":"#/components/schemas/AiSummaryEvolutionDto"},"notes":{"type":"array","items":{"type":"string","enum":["visibility-ignores-audience-and-tags","empty-scope","visibility-from-last-run"]}}},"required":["family","subject","report","scope","visibility","entities","sources","evolution","notes"]},"AiSummaryAppliedFiltersDto":{"type":"object","properties":{"llm":{"type":"array","items":{"type":"string"}},"language":{"type":"array","items":{"type":"string"}},"category":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"market":{"type":"array","items":{"type":"string"}},"marketScope":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"to":{"type":"string"}},"required":["llm","language","category","tags","market","marketScope"]},"AiSummaryPartialFilterDto":{"type":"object","properties":{"filter":{"type":"string","enum":["category","tags"]},"sections":{"example":["visibility","competitors"],"description":"Parts of the facts this filter does not apply to.","type":"array","items":{"type":"string"}}},"required":["filter","sections"]},"AiSummaryIgnoredFiltersDto":{"type":"object","properties":{"llm":{"description":"Requested LLMs absent from the report.","type":"array","items":{"type":"string"}},"language":{"description":"Requested languages absent from the report.","type":"array","items":{"type":"string"}},"partial":{"type":"array","items":{"$ref":"#/components/schemas/AiSummaryPartialFilterDto"}}},"required":["llm","language","partial"]},"AiSummaryFiltersDto":{"type":"object","properties":{"applied":{"$ref":"#/components/schemas/AiSummaryAppliedFiltersDto"},"ignored":{"$ref":"#/components/schemas/AiSummaryIgnoredFiltersDto"}},"required":["applied","ignored"]},"AiSummaryResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["ready"]},"keyPoints":{"description":"3 to 5 key points. Agnostic: visibility, position versus the other products, sources, evolution. Brand: visibility, sources, evolution.","type":"array","items":{"type":"string"}},"interpretation":{"description":"2 or 3 interpretation points and recommended actions.","type":"array","items":{"type":"string"}},"caveats":{"description":"Fixed sentences on the scope (active filters, filters that do not apply to visibility, series): show them with the text.","type":"array","items":{"type":"string"}},"facts":{"description":"The figures the text is drawn from. Every number in the text exists here.","allOf":[{"$ref":"#/components/schemas/AiSummaryFactsDto"}]},"filters":{"$ref":"#/components/schemas/AiSummaryFiltersDto"},"outputLanguage":{"type":"string","enum":["en","fr"]},"promptVersion":{"type":"string","example":"ai-summary-v5"},"generatedAt":{"type":"string","example":"2026-10-29T10:12:00.000Z"},"textSource":{"type":"string","enum":["llm","template"],"description":"llm = model text that passed the number check; template = deterministic text built from the facts (fallback)."}},"required":["status","keyPoints","interpretation","caveats","facts","filters","outputLanguage","promptVersion","generatedAt","textSource"]},"AiSummaryPendingResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"retryAfterSeconds":{"type":"number","example":5,"description":"Same value as the Retry-After header."},"caveats":{"description":"Fixed sentences on the scope, as in the ready response.","type":"array","items":{"type":"string"}},"facts":{"description":"Already computed: can be shown while the text is generated.","allOf":[{"$ref":"#/components/schemas/AiSummaryFactsDto"}]},"filters":{"$ref":"#/components/schemas/AiSummaryFiltersDto"},"outputLanguage":{"type":"string","enum":["en","fr"]},"promptVersion":{"type":"string","example":"ai-summary-v5"}},"required":["status","retryAfterSeconds","caveats","facts","filters","outputLanguage","promptVersion"]},"ActModeContentDraftDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"workspaceId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"recommendationKey":{"type":"string","example":"geo|Claude|en|0","description":"Synthetic recommendation key (URL-encoded when sent in path params)"},"contentMarkdown":{"type":"string","example":"## Article Title\n\nMarkdown content here...","description":"Latest content (markdown)"},"chatHistory":{"type":"object","nullable":true,"description":"JSON-serialised chat history attached to this draft (array of { role, content }). Null when no chat happened yet."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","workspaceId","recommendationKey","contentMarkdown","createdAt","updatedAt"]},"ActModeWorkspaceResponseDto":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string","description":"Brand report ID this workspace is attached to"},"accountProductId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"contentDrafts":{"type":"array","items":{"$ref":"#/components/schemas/ActModeContentDraftDto"}}},"required":["id","reportId","accountProductId","createdAt","updatedAt","contentDrafts"]},"SaveActModeDraftDto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Stable key for the recommendation (e.g. geo|Claude|en|0)"},"contentMarkdown":{"type":"string","description":"Markdown content of the draft"},"chatHistory":{"description":"Chat history for this recommendation","example":[{"role":"user","content":"..."},{"role":"assistant","content":"..."}],"type":"array","items":{"type":"string"}}},"required":["recommendationKey","contentMarkdown"]},"ActModeChatDto":{"type":"object","properties":{"messages":{"description":"Conversation messages (user and assistant)","example":[{"role":"user","content":"How can I structure this article?"},{"role":"assistant","content":"..."}],"type":"array","items":{"type":"string"}},"recommendationContext":{"type":"string","description":"Current recommendation context for content generation. Should include: type (GEO/SEO/AEO), title, description, target keywords, language, and any relevant steps or guidelines.","example":"Type: GEO\nTitle: Create content about product benefits\nDescription: Write an article targeting the question \"What are the benefits of [Product]?\"\nKeywords: product benefits, advantages, uses\nLanguage: English\nTarget: Healthcare professionals"}},"required":["messages"]},"ActModeChatResponseDto":{"type":"object","properties":{"reply":{"type":"string","example":"Sure — here is a draft you can adapt...","description":"Latest assistant message (string only). Conversation context is held client-side."}},"required":["reply"]},"GenerateContentDto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Stable key for the recommendation (e.g. geo|Claude|en|0)"},"recommendationContext":{"type":"string","description":"Rich context for content generation including type, title, description, keywords, language, target audience, and steps","example":"Type: GEO\nTitle: Create content about Aspirin benefits\nDescription: Write an article targeting the question \"What are the benefits of Aspirin?\"\nTarget Question: What are the benefits of Aspirin?\nKeywords: aspirin benefits, aspirin uses, pain relief, heart health\nLanguage: English\nTarget Audience: General public\nSteps:\n1. Research medical benefits\n2. Structure with clear sections\n3. Include disclaimers"},"additionalInstructions":{"type":"string","description":"Optional additional instructions for content generation","example":"Focus on scientific evidence and include recent studies"}},"required":["recommendationKey","recommendationContext"]},"ActModeGenerateContentResponseDto":{"type":"object","properties":{"content":{"type":"string","example":"## Article Title\n\nMarkdown content here...","description":"Generated article content (markdown)"},"saved":{"type":"boolean","example":false,"description":"Whether the generated content was auto-saved as a draft. Defaults to false (frontend decides when to save)."}},"required":["content","saved"]},"AgnosticReportListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Report unique identifier"},"pathology":{"type":"string","description":"Pathology (canonical name)"},"market":{"type":"object","nullable":true,"description":"Market"},"languages":{"description":"Language codes configured for this report","type":"array","items":{"type":"string"}},"title":{"type":"string","description":"Report title"},"questionVolume":{"type":"object","nullable":true,"description":"Question volume estimate"},"status":{"type":"string","description":"Report status","example":"done"},"createdAt":{"format":"date-time","type":"string","description":"Creation date (ISO 8601)"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date (ISO 8601)"},"overview":{"type":"object","description":"Overview payload (shape varies)"},"metadata":{"type":"object","description":"Opaque metadata"},"recurringAgnosticReportId":{"type":"object","nullable":true,"description":"Recurring agnostic report ID when applicable"}},"required":["id","pathology","languages","title","status","createdAt","updatedAt"]},"PaginatedAgnosticReportsResponseDto":{"type":"object","properties":{"data":{"description":"List of agnostic reports (rows from agnostic-crud list select — no llms, trackedProducts, counts)","type":"array","items":{"$ref":"#/components/schemas/AgnosticReportListItemDto"}},"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetaDto"}]}},"required":["data","meta"]},"AgnosticReportDetailResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Report unique identifier"},"accountProductId":{"type":"string","description":"Account product ID"},"authorUserId":{"type":"object","description":"Author user ID","nullable":true},"pathology":{"type":"string","description":"Pathology (canonical name)"},"market":{"type":"object","description":"Market","nullable":true},"languages":{"type":"array","description":"Languages – array of language codes, e.g. [\"en\", \"fr\"]","items":{"type":"string"}},"trackedProducts":{"type":"object","description":"Tracked product IDs (canonical)","nullable":true},"llms":{"type":"array","description":"LLM providers used – array of names, e.g. [\"OpenAI\", \"Perplexity\"]","items":{"type":"string"}},"questionVolume":{"type":"object","description":"Question volume","nullable":true},"status":{"type":"string","description":"Report status","example":"done"},"title":{"type":"string","description":"Report title"},"content":{"type":"object","description":"Report content – AgnosticReportData structure (sections, overview, etc.)"},"questions":{"type":"object","description":"Questions (brand-free) validated for the report","nullable":true},"answers":{"type":"object","description":"Answers with detected entities","nullable":true},"metrics":{"type":"object","description":"Metrics – AR, SOV, co-mentions by language/LLM","nullable":true},"sources":{"type":"object","description":"Extracted sources","nullable":true},"overview":{"type":"object","description":"Agnostic-specific overview","nullable":true},"entities":{"type":"object","description":"Product entities detected – array of ProductEntity","nullable":true},"entityMentions":{"type":"object","description":"Entity mentions – array of EntityMention","nullable":true},"createdAt":{"type":"string","description":"Creation date (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update date (ISO 8601)"},"recurringAgnosticReportId":{"type":"object","description":"Recurring agnostic report ID","nullable":true},"trackedTerms":{"description":"Tracked terms snapshot at generation","nullable":true,"type":"array","items":{"type":"string"}},"termMentionRates":{"type":"object","description":"Per-term mention rates at generation: { aggregate, byLanguage?, byLlm? }","nullable":true}},"required":["id","accountProductId","pathology","languages","llms","status","title","content","createdAt","updatedAt"]},"CreateAgnosticReportResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"title":{"type":"string","example":"Atopic Dermatitis (FR)"},"pathology":{"type":"string","example":"Atopic Dermatitis"},"status":{"type":"string","example":"running","enum":["pending","running","done","error","cancelled"]},"createdAt":{"format":"date-time","type":"string"}},"required":["id","title","pathology","status","createdAt"]},"PendingAgnosticReportResponseDto":{"type":"object","properties":{"hasPending":{"type":"boolean","example":false},"report":{"type":"object","nullable":true,"description":"The pending/running report if one exists, otherwise null","additionalProperties":true}},"required":["hasPending"]},"RecurringAgnosticShellDto":{"type":"object","properties":{"id":{"type":"string"},"accountProductId":{"type":"string"},"pathology":{"type":"string","example":"Atopic Dermatitis"},"market":{"type":"object","nullable":true},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"recurrenceType":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"metadata":{"type":"object","description":"Opaque metadata blob from the recurring report row"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","accountProductId","pathology","languages","llms","isActive","createdAt","updatedAt"]},"RecurringAgnosticWithSettingsDto":{"type":"object","properties":{"id":{"type":"string"},"accountProductId":{"type":"string"},"pathology":{"type":"string","example":"Atopic Dermatitis"},"market":{"type":"object","nullable":true},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"recurrenceType":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"metadata":{"type":"object","description":"Opaque metadata blob from the recurring report row"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"activeAgnosticReportSettings":{"type":"object","additionalProperties":true,"nullable":true},"agnosticReportSettings":{"type":"array","items":{"type":"object"}}},"required":["id","accountProductId","pathology","languages","llms","isActive","createdAt","updatedAt"]},"RecurringAgnosticListLastReportDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","title","createdAt"]},"RecurringAgnosticListItemDto":{"type":"object","properties":{"id":{"type":"string"},"pathology":{"type":"string"},"market":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"recurrenceType":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastReport":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/RecurringAgnosticListLastReportDto"}]},"totalReports":{"type":"number","example":5}},"required":["id","pathology","isActive","createdAt","updatedAt","lastReport","totalReports"]},"PaginatedRecurringAgnosticResponseDto":{"type":"object","properties":{"data":{"description":"Slim recurring rows (no accountProductId, languages, llms at root — use GET /agnostic/recurring/:id for settings).","type":"array","items":{"$ref":"#/components/schemas/RecurringAgnosticListItemDto"}},"meta":{"type":"object","description":"Pagination metadata","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"pages":{"type":"number"}}}},"required":["data","meta"]},"AgnosticEvolutionTermPointDto":{"type":"object","properties":{"term":{"type":"string","example":"mechanism of action"},"mentionRate":{"type":"number","example":0.25,"description":"Share of answers containing the term (0–1)"},"mentionCount":{"type":"number","example":12},"totalAnswers":{"type":"number","example":48}},"required":["term","mentionRate"]},"AgnosticEvolutionPointDto":{"type":"object","properties":{"reportId":{"type":"string"},"createdAt":{"type":"string"},"questionCount":{"type":"number","example":120,"description":"Questions of this run — same value as the unfiltered `/summary` `counts.questions`. Never affected by the llm / language / market / category / tags filters (see `filteredQuestionCount`)."},"filteredQuestionCount":{"type":"number","example":20,"description":"Questions of this run that pass the active filters — same value as `/summary` `counts.questions` with the same filters. Tags are read on the question; category / llm / language / market keep the questions that have an answer within that scope. Equals `questionCount` when no filter is set."},"products":{"type":"array","description":"Tracked products with share-of-voice and appearance rate","items":{"type":"object","properties":{"productId":{"type":"string"},"canonicalName":{"type":"string"},"shareOfVoice":{"type":"number"},"appearanceRate":{"type":"number"}}}},"terms":{"description":"Per tracked term mention rate for this report run","type":"array","items":{"$ref":"#/components/schemas/AgnosticEvolutionTermPointDto"}}},"required":["reportId","createdAt","questionCount","filteredQuestionCount"]},"AgnosticEvolutionResponseDto":{"type":"object","properties":{"pathology":{"type":"string"},"market":{"type":"object","nullable":true},"evolution":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticEvolutionPointDto"}}},"required":["pathology","evolution"]},"AgnosticReportSettingsItemDto":{"type":"object","properties":{"id":{"type":"string"},"recurringAgnosticReportId":{"type":"string"},"pathology":{"type":"string"},"name":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"trackedTerms":{"description":"Keywords/phrases to track mention rate in LLM answers","type":"array","items":{"type":"string"}},"customQuestions":{"type":"object","properties":{"patient":{"type":"array","items":{"type":"string"}},"professional":{"type":"array","items":{"type":"string"}},"payer":{"type":"array","items":{"type":"string"}}}},"ownedDomains":{"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"markets":{"description":"Marchés régionaux effectifs — **toujours présent, jamais `null`**. Quand la configuration n’en porte pas, la valeur publiée est celle qui s’applique réellement : accountProduct.defaultMarket, sinon la région d’origine (`eu`). Les `languages` de ces entrées font autorité sur la couverture linguistique, et le champ `languages` racine en est l’union — les deux ne peuvent pas diverger.","items":{"type":"array"},"type":"array"}},"required":["id","recurringAgnosticReportId","pathology","name","languages","llms","createdAt","updatedAt","markets"]},"AgnosticMetricsLanguageSegmentDto":{"type":"object","properties":{"language":{"type":"string","example":"fr"},"market":{"type":"object","nullable":true,"example":"France"},"products":{"type":"array","description":"Per-product SOV / appearance metrics for this language segment","items":{"type":"object","additionalProperties":true}},"coMentions":{"type":"array","description":"Co-mention edges for this segment (raw from report JSON)","items":{"type":"object","additionalProperties":true}}},"required":["language","market","products","coMentions"]},"AgnosticMetricsResponseDto":{"type":"object","properties":{"reportId":{"type":"string","description":"Agnostic report id"},"pathology":{"type":"string"},"market":{"type":"object","nullable":true},"languages":{"description":"Metrics broken down by language (not a root `metrics` array name)","type":"array","items":{"$ref":"#/components/schemas/AgnosticMetricsLanguageSegmentDto"}}},"required":["reportId","pathology","languages"]},"AgnosticGeneratedReportsPageDto":{"type":"object","properties":{"data":{"type":"array","description":"Slim generated agnostic reports (id, title, status, timestamps).","items":{"type":"object","additionalProperties":true}},"meta":{"$ref":"#/components/schemas/CursorPageMetaSimpleDto"}},"required":["data","meta"]},"AgnosticCustomQuestionsDto":{"type":"object","properties":{"patient":{"example":["Question 1?",{"question":"Question 2?","tags":["safety"]}],"type":"array","items":{"type":"array"}},"professional":{"example":["Question 1?",{"question":"Question 2?","tags":["efficacy"]}],"type":"array","items":{"type":"array"}},"payer":{"example":["Question 1?",{"question":"Question 2?","tags":["reimbursement"]}],"type":"array","items":{"type":"array"}}}},"TrackedProductPromotionDto":{"type":"object","properties":{"product":{"type":"string","example":"Dupixent","description":"Tracked product name, as listed in trackedProducts"},"promotionBlockedMarkets":{"example":["fr"],"description":"Market codes where this product may not be promoted","type":"array","items":{"type":"string"}}},"required":["product"]},"AgnosticPersonaAssignmentDto":{"type":"object","properties":{"questionText":{"type":"string","description":"EN text of a custom question to replay per persona"},"personaIds":{"description":"Persona ids to replay this question for","type":"array","items":{"type":"string"}}},"required":["questionText","personaIds"]},"CreateAgnosticReportDto":{"type":"object","properties":{"pathology":{"type":"string","example":"diabetes","description":"Pathology to analyze"},"market":{"type":"string","example":"France","description":"Target market (optional)"},"languages":{"type":"array","example":["fr","en"],"description":"Languages for the report. Supported: en, fr, de, es, it, pt, zh, ja, ko, ar","items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}},"trackedProducts":{"example":["product-1","product-2"],"description":"Canonical product IDs to track (optional)","type":"array","items":{"type":"array"}},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"llms":{"type":"array","example":["OpenAI","Claude"],"description":"LLMs to use for report generation. Supported: OpenAI, Perplexity, Claude, Gemini, Mistral, Grok, GoogleAIO (Google AI Overviews) and GoogleAIMode (Google AI Mode), both requiring the AI Overviews option and at least one LLM","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"customQuestions":{"description":"Custom questions by category (optional)","allOf":[{"$ref":"#/components/schemas/AgnosticCustomQuestionsDto"}]},"questionVolume":{"type":"number","example":10,"description":"Number of questions to generate (optional)"},"maxSources":{"type":"number","example":50,"description":"Maximum number of sources per answer (optional). Default: unlimited (50)."},"answerLenWords":{"type":"number","example":240,"description":"Answer length in words (optional)"},"ownedDomains":{"example":["sanofi.com","product.sanofi.com"],"description":"Proprietary domains to track citation frequency (optional)","type":"array","items":{"type":"array"}},"trackedProductPromotion":{"description":"Per tracked product: market codes (e.g. \"fr\") where that product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"$ref":"#/components/schemas/TrackedProductPromotionDto"}},"metadata":{"type":"object","example":{"campaign":"Q1-2025","source":"api"},"description":"Optional client-defined metadata (arbitrary key-value object). Stored as-is and returned on the report."},"markets":{"example":[{"market":"us","languages":["en"]}],"description":"Optional list of regional markets. When provided, answer generation is routed to the corresponding regional microservice. Overrides the root `languages` field for the covered languages. Supported markets: us.","type":"array","items":{"$ref":"#/components/schemas/MarketEntryDto"}},"recurringAgnosticReportId":{"type":"string","example":"uuid-of-recurring-agnostic-report","description":"ID of an existing RecurringAgnosticReport to link this report to. If provided, skips auto-creation of recurring report."},"personaAssignments":{"description":"WS3 — per custom question, which personas to replay it for (max 3 distinct).","type":"array","items":{"$ref":"#/components/schemas/AgnosticPersonaAssignmentDto"}}},"required":["pathology","languages","llms"]},"TrendingExcludeQuestionsAgnosticDto":{"type":"object","properties":{"patient":{"maxItems":500,"type":"array","items":{"type":"string"}},"professional":{"maxItems":500,"type":"array","items":{"type":"string"}},"payer":{"maxItems":500,"type":"array","items":{"type":"string"}}}},"AgnosticTrendingQuestionsBodyDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Migraine","description":"Pathology name"},"languages":{"example":["fr","en"],"description":"Language codes for trending generation","type":"array","items":{"type":"string"}},"excludeQuestions":{"$ref":"#/components/schemas/TrendingExcludeQuestionsAgnosticDto"},"llm":{"type":"string","example":"Perplexity","description":"Override TRENDING_LLM: Perplexity or OpenAI"}},"required":["pathology"]},"CreateRecurringAgnosticDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Diabetes","description":"Pathology name. Omit it for a cross-pathology report: the corpus is then driven entirely by the customQuestions pushed on the settings, and the report is stored under the \"Multi-pathology\" label. Any later call that must echo this value (POST recurring/settings/:id) has to send that same label."},"market":{"type":"string","example":"France","description":"Market (optional)"},"isActive":{"type":"boolean","example":true,"description":"Arm the recurring report straight away (default false). Requires at least one customQuestion, since a run without questions can only fail. Once active, the first run is picked up by the next scheduler tick."},"recurrenceType":{"type":"string","example":"WEEKLY","description":"Recurrence type (default MONTHLY)","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"languages":{"example":["en","fr"],"description":"Languages (default [\"en\"], or the union of `markets` languages when markets are given).","type":"array","items":{"type":"array"}},"llms":{"example":["OpenAI","Perplexity"],"description":"LLMs (default [\"OpenAI\"]).","type":"array","items":{"type":"array"}},"customQuestions":{"description":"Questions driving the corpus. Providing them here creates the report ready to run, with no follow-up call on the settings.","allOf":[{"$ref":"#/components/schemas/AgnosticCustomQuestionsDto"}]},"trackedProducts":{"example":["Dupixent"],"type":"array","items":{"type":"array"}},"trackedTerms":{"example":["Sanofi","type 2 inflammation"],"description":"Keywords whose mention rate is tracked in the answers — a laboratory name belongs here, not in trackedProducts.","type":"array","items":{"type":"array"}},"ownedDomains":{"example":["sanofi.com"],"type":"array","items":{"type":"array"}},"trackedProductPromotion":{"description":"Per tracked product: market codes (e.g. \"fr\") where that product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"$ref":"#/components/schemas/TrackedProductPromotionDto"}},"markets":{"description":"Regional markets [{ market, languages }]. When given, they drive language coverage over `languages`.","items":{"type":"array"},"type":"array"},"metadata":{"type":"object","example":{"campaign":"Q1-2026","source":"api"},"description":"Optional client-defined metadata (arbitrary key-value object). Stored on the recurring report."}}},"UpdateRecurringAgnosticStatusDto":{"type":"object","properties":{"isActive":{"type":"boolean","example":true,"description":"Active/inactive status"}},"required":["isActive"]},"UpdateRecurringAgnosticSettingsDto":{"type":"object","properties":{"llms":{"example":["OpenAi","Claude"],"description":"LLMs (optional)","type":"array","items":{"type":"array"}},"languages":{"example":["fr","en"],"description":"Languages (optional)","type":"array","items":{"type":"array"}},"recurrenceType":{"type":"string","example":"MONTHLY","description":"Recurrence type","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"nextRunAt":{"type":"string","example":"2026-06-15T09:00:00.000Z","description":"Next run date (optional). Only valid when recurrenceType is provided. If omitted, next run is calculated automatically."},"trackedProducts":{"example":["product-1","product-2"],"description":"Tracked product IDs (optional)","type":"array","items":{"type":"array"}},"trackedProductPromotion":{"description":"Per tracked product: market codes (e.g. \"fr\") where that product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"$ref":"#/components/schemas/TrackedProductPromotionDto"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"market":{"type":"string","example":"France","description":"Market (optional)"},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Tableau vide → efface la configuration régionale et rend la main à accountProduct.defaultMarket.","items":{"type":"array"},"type":"array"},"metadata":{"type":"object","example":{"campaign":"Q1-2026","source":"api"},"description":"Optional client-defined metadata on the recurring report (arbitrary key-value object)."}}},"CreateAgnosticReportSettingsDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Diabetes Type 2","description":"Pathology (immutable after creation)"},"name":{"type":"string","example":"Diabetes – US"},"languages":{"example":["en","fr"],"deprecated":true,"description":"DÉPRÉCIÉ — `markets` fait autorité sur la couverture linguistique. Facultatif dès lors que `markets` est fourni : les langues sont alors l'union de celles de chaque marché. Conservé pour les intégrations qui ne configurent pas encore de marché ; retiré à la prochaine version d’API. En lecture, ce champ renvoie toujours l'union des langues des marchés, donc les deux ne peuvent plus diverger.","type":"array","items":{"type":"array"}},"llms":{"type":"array","example":["OpenAI","Perplexity"],"items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"trackedProducts":{"example":["Product A"],"type":"array","items":{"type":"array"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"customQuestions":{"$ref":"#/components/schemas/AgnosticCustomQuestionsDto"},"ownedDomains":{"example":["sanofi.com"],"type":"array","items":{"type":"array"}},"trackedProductPromotion":{"description":"Per tracked product: market codes (e.g. \"fr\") where that product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"$ref":"#/components/schemas/TrackedProductPromotionDto"}},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Vide → accountProduct.defaultMarket, sinon génération locale.","items":{"type":"array"},"type":"array"}},"required":["pathology","llms"]},"SetActiveAgnosticReportSettingsDto":{"type":"object","properties":{"activeAgnosticReportSettingsId":{"type":"string","example":"uuid","description":"AgnosticReportSettings id to set as active"}},"required":["activeAgnosticReportSettingsId"]},"UpdateAgnosticReportSettingsDto":{"type":"object","properties":{"name":{"type":"string","example":"Diabetes – US"},"languages":{"example":["en","fr"],"type":"array","items":{"type":"array"}},"llms":{"type":"array","example":["OpenAI","Perplexity"],"items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"trackedProducts":{"example":["Product A"],"type":"array","items":{"type":"array"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"trackedTerms":{"example":["mechanism of action","type 2 inflammation"],"description":"Keywords/phrases to track mention rate in LLM answers (case-insensitive, multi-word supported)","type":"array","items":{"type":"array"}},"customQuestions":{"$ref":"#/components/schemas/AgnosticCustomQuestionsDto"},"ownedDomains":{"example":["sanofi.com"],"type":"array","items":{"type":"array"}},"trackedProductPromotion":{"description":"Per tracked product: market codes (e.g. \"fr\") where that product may not be promoted (not authorised or not launched). Recommendations for these markets stay non-promotional. Applied when the recommendation standard is enabled.","type":"array","items":{"$ref":"#/components/schemas/TrackedProductPromotionDto"}},"markets":{"description":"Marchés régionaux [{ market, languages }]. Fait autorité sur la couverture linguistique : quand il est fourni, ce sont les `languages` de chaque entrée qui pilotent la génération, pas le `languages` racine. Vide → accountProduct.defaultMarket, sinon génération locale.","items":{"type":"array"},"type":"array"}}},"AgnosticReportCountsDto":{"type":"object","properties":{"questions":{"type":"number","example":100},"answers":{"type":"number","example":600},"entityMentions":{"type":"number","example":1600},"productsTracked":{"type":"number","example":8},"sources":{"type":"number","example":2400},"metricsLanguages":{"type":"number","example":3}},"required":["questions","answers","entityMentions","productsTracked","sources","metricsLanguages"]},"AgnosticReportSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"pathology":{"type":"string"},"market":{"type":"object","nullable":true},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"},"counts":{"$ref":"#/components/schemas/AgnosticReportCountsDto"},"filters":{"description":"Echo of the filters as the API parsed them, plus any requested `llm`/`language` values this report does not contain. Ignored values did not restrict the counts above.","allOf":[{"$ref":"#/components/schemas/FilterEchoDto"}]}},"required":["id","title","status","createdAt","updatedAt","pathology","languages","llms","trackedProducts","counts","filters"]},"AgnosticOverviewResponseDto":{"type":"object","properties":{"data":{"type":"object","nullable":true,"description":"AgnosticOverviewData object (singleton). Null when not available. `answersCollected` counts shown answers only; `answersNotTriggered` counts Google questions with no AI answer; `engineAppearance.byLlm[engine].rate` is the share (0-1) of asked questions for which Google showed an AI answer (Google engines only).","additionalProperties":true}}},"AgnosticBrandFreeQuestionDto":{"type":"object","properties":{"id":{"type":"string","example":"q-001"},"llmName":{"type":"string"},"language":{"type":"string"},"question":{"type":"string"},"category":{"type":"string","enum":["patient","professional","payer"]},"intent":{"type":"string","example":"mechanism","description":"Question intent (mechanism, indication, ...)"},"isProductTrigger":{"type":"boolean","example":false,"description":"True when the question explicitly references a tracked product (PRODUCT_PROBE)"}},"required":["id","llmName","language","question","category","isProductTrigger"]},"AgnosticQuestionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticBrandFreeQuestionDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticAnswerListItemDto":{"type":"object","properties":{"answerKey":{"type":"string"},"questionId":{"type":"string"},"llmName":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","enum":["patient","professional","payer"]},"answerOriginal":{"type":"string"},"answerEnglish":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"detectedEntities":{"type":"array","items":{"type":"object"}},"flags":{"type":"object"},"reliability":{"type":"number"},"notTriggered":{"type":"boolean","description":"True when Google (AI Overviews / AI Mode) showed no AI answer for this question. The answer is empty, counts as \"not mentioned\" in appearance rates and has no reliability score."}},"required":["answerKey","questionId","llmName","language","answerOriginal","answerEnglish","sources","detectedEntities","flags"]},"AgnosticAnswersPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticAnswerListItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticAnswerDetailDto":{"type":"object","properties":{"answerKey":{"type":"string"},"questionId":{"type":"string"},"llmName":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","enum":["patient","professional","payer"]},"answerOriginal":{"type":"string"},"answerEnglish":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"detectedEntities":{"type":"array","items":{"type":"object"}},"flags":{"type":"object"},"reliability":{"type":"number"},"notTriggered":{"type":"boolean","description":"True when Google (AI Overviews / AI Mode) showed no AI answer for this question. The answer is empty, counts as \"not mentioned\" in appearance rates and has no reliability score."}},"required":["answerKey","questionId","llmName","language","answerOriginal","answerEnglish","sources","detectedEntities","flags"]},"AgnosticAnswerSourceItemDto":{"type":"object","properties":{"title":{"type":"string","example":"Asthma symptoms — Mayo Clinic"},"link":{"type":"string","example":"https://www.mayoclinic.org/diseases-conditions/asthma"},"type":{"type":"string","example":"reference"},"reliability":{"type":"number","example":0.92},"answerKey":{"type":"string"}},"required":["title","link","type","answerKey"]},"AgnosticAnswerSourcesPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticAnswerSourceItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticEntityMentionItemDto":{"type":"object","properties":{"id":{"type":"string","example":"mention-1777559971176-q1-0"},"entityId":{"type":"string","example":"entity_pixl9s"},"entityType":{"type":"string","enum":["PRODUCT","MOLECULE","SYMPTOM","MODALITY","COMPETITOR","CLASS"]},"confidence":{"type":"number","example":1,"description":"NER confidence score (0–1)"},"text":{"type":"string","example":"Vyndaqel","description":"Surface form as detected in the answer text"},"normalizedText":{"type":"string","example":"Vyndaqel","description":"Normalized label from the NER pipeline"},"answerId":{"type":"string","example":"OpenAI__q1"},"context":{"type":"string"},"sourceSpan":{"type":"string"},"answerKey":{"type":"string","example":"cGF0aWVudC9PcGVuQUkvZnIvMA"},"llm":{"type":"string","example":"OpenAI"},"language":{"type":"string","example":"fr"},"questionId":{"type":"string","example":"q1"},"category":{"type":"string","enum":["patient","professional","payer"]}},"required":["id","entityId","entityType","confidence","text","normalizedText","answerKey","llm","language","questionId"]},"AgnosticEntityMentionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticEntityMentionItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticSourceItemDto":{"type":"object","properties":{"llm":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","enum":["patient","professional","payer"]},"title":{"type":"string"},"link":{"type":"string"},"type":{"type":"string"},"reliability":{"type":"number"},"domain":{"type":"string"}},"required":["llm","title","link","type"]},"AgnosticSourcesPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticSourceItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticCitationDomainDto":{"type":"object","properties":{"domain":{"type":"string","example":"en.wikipedia.org","description":"Host of the cited link without `www.`; subdomains stay distinct."},"citationCount":{"type":"number","example":2310},"citationRate":{"type":"number","example":0.0727,"description":"citationCount / total"},"sourceType":{"type":"object","example":"Guideline","nullable":true,"description":"Most cited source `type` in this domain (ties: alphabetical)."},"isOwned":{"type":"boolean","example":false,"description":"True when at least one cited link of this domain matches an owned URL."}},"required":["domain","citationCount","citationRate","sourceType","isOwned"]},"AgnosticBestOwnedDomainDto":{"type":"object","properties":{"domain":{"type":"string","example":"sanofi.com"},"rank":{"type":"number","example":28,"description":"1-based position in the full domain ranking."},"citationCount":{"type":"number","example":540}},"required":["domain","rank","citationCount"]},"AgnosticCitationsSummaryDto":{"type":"object","properties":{"total":{"type":"number","example":31772,"description":"Number of citations (one cited link in one answer). Denominator of every rate."},"ownedTotal":{"type":"number","example":760,"description":"Citations whose link matches an owned URL."},"ownedShare":{"type":"number","example":0.0239,"description":"ownedTotal / total (0 when total is 0)."},"domainCount":{"type":"number","example":412,"description":"Number of distinct domains."},"topDomains":{"description":"Top 10 domains by citations, then domain ascending.","type":"array","items":{"$ref":"#/components/schemas/AgnosticCitationDomainDto"}},"bestOwned":{"nullable":true,"description":"First owned domain in the full ranking; null when none.","allOf":[{"$ref":"#/components/schemas/AgnosticBestOwnedDomainDto"}]},"ownedUrls":{"description":"Owned URLs applied: the active settings of the series, or the run snapshot for a standalone run.","type":"array","items":{"type":"string"}},"urlCount":{"type":"number","example":41250,"description":"Number of distinct cited URLs (before the `urlLimit` bound of `topUrls`)."},"byType":{"description":"Citations by source `type`, every type present, by citations then type ascending. Sums to `total`.","type":"array","items":{"$ref":"#/components/schemas/CitationTypeCountDto"}},"domains":{"description":"Full domain ranking, same order as `topDomains` (citations, then domain ascending), with `urlCount`. Every domain unless `domainLimit` bounds it (default 100, up to 10000); complete (`domainCount` entries), it sums to `total`; its first 10 entries are `topDomains`.","type":"array","items":{"$ref":"#/components/schemas/CitationDomainRankDto"}},"topDomainsByLlm":{"description":"One block per LLM, by citations then LLM name: its citations, distinct URLs and domains, and its top domains (`llmDomainLimit`, default 10). The blocks sum to `total`.","type":"array","items":{"$ref":"#/components/schemas/CitationLlmDomainsDto"}},"topUrls":{"description":"Most cited URLs, by citations then link ascending; at most `urlLimit` (default 100). URLs are keyed like the /sources series deduplication.","type":"array","items":{"$ref":"#/components/schemas/CitationUrlDto"}}},"required":["total","ownedTotal","ownedShare","domainCount","topDomains","bestOwned","ownedUrls","urlCount","byType","domains","topDomainsByLlm","topUrls"]},"AgnosticSourcesSummaryResponseDto":{"type":"object","properties":{"citations":{"$ref":"#/components/schemas/AgnosticCitationsSummaryDto"}},"required":["citations"]},"AgnosticTopProductDto":{"type":"object","properties":{"productId":{"type":"string"},"name":{"type":"string"},"shareOfVoice":{"type":"number","example":0.42}},"required":["productId","name","shareOfVoice"]},"AgnosticMetricsSummaryItemDto":{"type":"object","properties":{"market":{"type":"object","nullable":true,"example":"France"},"language":{"type":"string","example":"fr"},"productCount":{"type":"number","example":12},"coMentionCount":{"type":"number","example":3},"topProduct":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AgnosticTopProductDto"}]}},"required":["market","language","productCount","coMentionCount","topProduct"]},"AgnosticMetricsLinksDto":{"type":"object","properties":{"products":{"type":"string","example":"/v1/agnostic/reports/abc/metrics/products"},"coMentions":{"type":"string","example":"/v1/agnostic/reports/abc/metrics/co-mentions"}},"required":["products","coMentions"]},"AgnosticMetricsSummaryResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticMetricsSummaryItemDto"}},"links":{"$ref":"#/components/schemas/AgnosticMetricsLinksDto"}},"required":["data"]},"AgnosticProductMetricItemDto":{"type":"object","properties":{"productId":{"type":"string"},"canonicalName":{"type":"string"},"language":{"type":"string","example":"fr"},"market":{"type":"object","nullable":true,"example":"France"},"shareOfVoice":{"type":"number","example":0.42},"averageRank":{"type":"number","example":1.5},"mentions":{"type":"number","example":12,"description":"Number of mentions used to compute SOV/AR"}},"required":["productId","canonicalName","language","market","shareOfVoice"]},"AgnosticProductMetricsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticProductMetricItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticCoMentionItemDto":{"type":"object","properties":{"language":{"type":"string","example":"fr"},"market":{"type":"object","nullable":true,"example":"France"},"entity1Id":{"type":"string"},"entity1Type":{"type":"string"},"entity2Id":{"type":"string"},"entity2Type":{"type":"string"},"weight":{"type":"number","description":"Co-mention frequency / pmi (depending on the metric used)"}},"required":["language","market","entity1Id","entity1Type","entity2Id","entity2Type"]},"AgnosticCoMentionsPageDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgnosticCoMentionItemDto"}},"meta":{"$ref":"#/components/schemas/CursorPageMetaDto"}},"required":["data","meta"]},"AgnosticTrackedProductsResponseDto":{"type":"object","properties":{"data":{"example":["Doliprane","Dafalgan"],"type":"array","items":{"type":"string"}}},"required":["data"]},"SuggestQuestionsDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Asthma","description":"Pathology the suggested questions are about"},"brand":{"type":"string","example":"Dupixent","description":"Brand name. scope=market: used only to post-filter leaking suggestions (never injected in the generation prompt). scope=brand: required, questions are centered on it."},"competitors":{"example":["Fasenra","Nucala"],"description":"Competitor names. scope=market: used only to post-filter leaking suggestions. scope=brand with a brand: activates an extra \"competitive\" category of head-to-head questions where every competitor is represented by the literal placeholder {COMPETITOR} (real competitor names never appear in the suggestions).","type":"array","items":{"type":"string"}},"language":{"type":"string","example":"en","description":"ISO 639-1 language of the suggested questions. Default: en"},"count":{"type":"number","example":10,"description":"Number of patient/professional/payer questions to return. Default 10, clamped to [1, 25]. When the competitive category is active (scope=brand + brand + competitors), up to min(5, max(3, floor(count/3))) competitive questions are appended on top of this count."},"scope":{"type":"string","enum":["market","brand"],"description":"market = brand-free demand-space questions (default); brand = questions centered on the provided brand (plus {COMPETITOR}-placeholder competitive questions when competitors are provided)"}},"required":["pathology"]},"PersonaAssignmentInput":{"type":"object","properties":{"questionText":{"type":"string","description":"EN text of a custom question to replay per persona"},"personaIds":{"description":"Persona ids to replay this question for","type":"array","items":{"type":"string"}}},"required":["questionText","personaIds"]},"CreateMergedReportDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Asthma","description":"Canonical pathology — drives the market context"},"brand":{"type":"string","example":"Dupixent","description":"Brand name — enables the brand context. Omit for market-only."},"brandAliases":{"example":["dupilumab","Dupixent®"],"type":"array","items":{"type":"string"}},"languages":{"example":["en","fr"],"description":"Languages for the analysis","type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","Claude","Gemini"],"description":"Engines to question. Supported: OpenAI, Perplexity, Claude, Gemini, Mistral, Grok, GoogleAIO, GoogleAIMode. GoogleAIO (Google AI Overviews) and GoogleAIMode (Google AI Mode) require the AI Overviews option and at least one LLM.","type":"array","items":{"type":"string"}},"competitors":{"example":["Fasenra","Nucala"],"type":"array","items":{"type":"string"}},"trackedProducts":{"example":["Fasenra","Benralizumab"],"type":"array","items":{"type":"string"}},"ownedDomains":{"example":["dupixent.com"],"type":"array","items":{"type":"string"}},"customQuestions":{"description":"Raw pool of custom questions — the LLM will triage them into brand/market/unused without rewriting. Each item can be a plain string or { question: string, tags?: string[] }.","type":"array","items":{"type":"string"}},"customQuestionsPatient":{"description":"Pre-classified patient brand questions (bypasses triage). String or { question, tags? }.","type":"array","items":{"type":"string"}},"customQuestionsProfessional":{"description":"Pre-classified professional brand questions (bypasses triage). String or { question, tags? }.","type":"array","items":{"type":"string"}},"customQuestionsPayer":{"description":"Pre-classified payer brand questions (bypasses triage)","type":"array","items":{"type":"string"}},"customQuestionsCompetitor":{"description":"Pre-classified competitive brand questions (bypasses triage). String or { question, tags? }.","type":"array","items":{"type":"string"}},"customQuestionsMarketPatient":{"description":"Pre-classified market-scope PATIENT questions (brand-free). Entries naming the brand/alias/competitor/tracked product are demoted to the patient BRAND bucket.","type":"array","items":{"type":"string"}},"customQuestionsMarketProfessional":{"description":"Pre-classified market-scope PROFESSIONAL questions (brand-free). Entries naming the brand/alias/competitor/tracked product are demoted to the professional BRAND bucket.","type":"array","items":{"type":"string"}},"customQuestionsMarketPayer":{"description":"Pre-classified market-scope PAYER questions (brand-free). Entries naming the brand/alias/competitor/tracked product are demoted to the payer BRAND bucket.","type":"array","items":{"type":"string"}},"trackedTerms":{"description":"Terms to monitor for mention rates across LLM responses (e.g. [\"mechanism of action\", \"digital health\"])","example":["mechanism of action","reimbursement"],"type":"array","items":{"type":"string"}},"markets":{"description":"Regional markets [{ market, languages }]. When set, answer generation is routed per market to its regional micro-service and answers are tagged with the market. Empty → accountProduct.defaultMarket (or local).","type":"array","items":{"$ref":"#/components/schemas/MarketEntryDto"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Country codes where the product may not be promoted (not authorised or not launched). Recommendations for these markets are restricted to non-promotional actions. Applies only when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"metadata":{"type":"object","description":"Arbitrary client-provided metadata"},"personaAssignments":{"description":"WS2 — per custom question, which personas to replay it for (in addition to the universal baseline). Max 3 distinct personas per run.","type":"array","items":{"$ref":"#/components/schemas/PersonaAssignmentInput"}}},"required":["pathology","languages","llms"]},"UpdateMergedRecurringSettingsDto":{"type":"object","properties":{"recurrenceType":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"],"description":"Schedule of the series. Changing it recomputes nextRunAt."},"brand":{"type":"string","description":"Brand name, or empty string to turn the series back into a market-only analysis."},"brandAliases":{"example":["dupilumab","Dupixent®"],"type":"array","items":{"type":"string"}},"languages":{"example":["en","fr"],"type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","Claude"],"description":"Engines to question. Supported: OpenAI, Perplexity, Claude, Gemini, Mistral, Grok, GoogleAIO, GoogleAIMode. GoogleAIO and GoogleAIMode require at least one LLM.","type":"array","items":{"type":"string"}},"competitors":{"example":["Fasenra","Nucala"],"type":"array","items":{"type":"string"}},"competitorAliases":{"type":"object","description":"Per-competitor name variants, keyed by competitor."},"trackedProducts":{"type":"array","items":{"type":"string"}},"promotionBlockedMarkets":{"example":["fr"],"description":"Country codes where the product may not be promoted (not authorised or not launched). Recommendations for these markets are restricted to non-promotional actions. Applies only when the recommendation standard is enabled.","type":"array","items":{"type":"string"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"ownedDomains":{"example":["dupixent.com"],"type":"array","items":{"type":"string"}},"trackedTerms":{"example":["mechanism of action"],"type":"array","items":{"type":"string"}},"customQuestions":{"description":"Raw question pool, triaged on each run. String or { question, tags? }.","type":"array","items":{"type":"string"}},"customQuestionsPatient":{"description":"Pre-classified patient brand questions.","type":"array","items":{"type":"string"}},"customQuestionsProfessional":{"description":"Pre-classified professional brand questions.","type":"array","items":{"type":"string"}},"customQuestionsPayer":{"description":"Pre-classified payer brand questions.","type":"array","items":{"type":"string"}},"customQuestionsCompetitor":{"description":"Pre-classified competitive brand questions.","type":"array","items":{"type":"string"}},"customQuestionsMarketPatient":{"description":"Pre-classified market-scope patient questions.","type":"array","items":{"type":"string"}},"customQuestionsMarketProfessional":{"description":"Pre-classified market-scope professional questions.","type":"array","items":{"type":"string"}},"customQuestionsMarketPayer":{"description":"Pre-classified market-scope payer questions.","type":"array","items":{"type":"string"}},"markets":{"description":"Regional markets. An empty array clears them and hands back to the account defaultMarket.","type":"array","items":{"$ref":"#/components/schemas/MarketEntryDto"}},"personaIds":{"description":"Personas re-activated on every run.","type":"array","items":{"type":"string"}},"personaAssignments":{"type":"array","items":{"$ref":"#/components/schemas/PersonaAssignmentInput"}},"driftEmailOptIn":{"type":"boolean","description":"Opt-in to drift-alert emails for this series."}}},"UpdateMergedRecurringNameDto":{"type":"object","properties":{"name":{"type":"string","nullable":true,"maxLength":80,"description":"Custom display name, trimmed. `null` or an empty string restores the default name.","example":"Dupixent · asthme sévère"}},"required":["name"]},"UpdateRecommendationStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["todo","in-progress","published","ignored"],"description":"One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1. `ignored` is refused for a recommendation that carries the recommendation standard on an account where it is enabled: dismiss it with PATCH /v2/reports/:id/recommendations/:recommendationId/state and a dismissReason."}},"required":["status"]},"ValidateQuestionsDto":{"type":"object","properties":{}},"SuggestCompetitorsDto":{"type":"object","properties":{}},"SuggestTrendingDto":{"type":"object","properties":{}},"CreateSubscriptionCheckoutDto":{"type":"object","properties":{"plan":{"type":"string","example":"STARTER","description":"Target PharmaGeo plan","enum":["FREE","STARTER","PRO","MAX","ENTERPRISE"]},"billingCycle":{"type":"string","example":"monthly","description":"Billing cycle","enum":["monthly","annual"]}},"required":["plan","billingCycle"]},"CheckoutSessionResponseDto":{"type":"object","properties":{"sessionId":{"type":"string","example":"cs_test_a1b2c3..."},"url":{"type":"string","example":"https://checkout.stripe.com/c/pay/cs_test_..."}},"required":["sessionId","url"]},"SetPayAsYouGoDto":{"type":"object","properties":{"enabled":{"type":"boolean","example":true,"description":"Enable (true) or disable (false) pay-as-you-go overage"},"budgetCents":{"type":"number","example":20000,"minimum":100,"description":"Monthly budget cap in cents (EUR). Required when enabling PAYG."},"capBehavior":{"type":"string","enum":["hard_stop","owner_confirm"],"example":"hard_stop","description":"Behaviour when the budget cap is reached (default: hard_stop)."}},"required":["enabled"]},"PortalSessionResponseDto":{"type":"object","properties":{"url":{"type":"string","example":"https://billing.stripe.com/p/session/..."}},"required":["url"]},"CreditBalanceResponseDto":{"type":"object","properties":{"subscription":{"type":"number","example":150,"description":"Resettable, plan-allocated credits"},"pack":{"type":"number","example":500,"description":"Non-expiring credits bought à la carte"},"total":{"type":"number","example":650,"description":"subscription + pack"}},"required":["subscription","pack","total"]},"SubscriptionSummaryResponseDto":{"type":"object","properties":{"plan":{"type":"string","example":"PRO","description":"Current PharmaGeo plan"},"billingCycle":{"type":"string","nullable":true,"example":"monthly","enum":["monthly","annual"]},"subscriptionStatus":{"type":"object","nullable":true,"example":"active","description":"Stripe subscription status"},"currentPeriodStart":{"type":"string","nullable":true,"format":"date-time"},"currentPeriodEnd":{"type":"string","nullable":true,"format":"date-time","description":"Next renewal date"},"nextReset":{"type":"string","format":"date-time","description":"Next credit recharge date. Paid: Stripe period end. FREE: one month after last reset (anniversary)."},"reportsThisPeriod":{"type":"number","example":1,"description":"Real merged reports created in the current period."},"hasStripeCustomer":{"type":"boolean","example":true,"description":"Whether a Stripe customer exists (portal available)"},"overageThisPeriod":{"type":"number","example":40,"description":"Pay-as-you-go overage units metered this billing period"},"payAsYouGoEnabled":{"type":"boolean","example":false,"description":"Whether pay-as-you-go overage is enabled (opt-in)"}},"required":["plan","nextReset","reportsThisPeriod","hasStripeCustomer","overageThisPeriod","payAsYouGoEnabled"]},"EstimateCostResponseDto":{"type":"object","properties":{"costUsd":{"type":"number","example":1.24,"description":"Estimated real USD cost of the described run"},"costCredits":{"type":"number","example":31,"description":"Estimated cost converted to credit units (CREDIT_COGS_USD)"},"kind":{"type":"string","example":"merged","enum":["merged","agnostic","brand"]}},"required":["costUsd","costCredits","kind"]},"InvoiceResponseDto":{"type":"object","properties":{"id":{"type":"string"},"stripeInvoiceId":{"type":"string","example":"in_1Sxyz..."},"amountPaid":{"type":"number","example":34900,"description":"Amount paid, in cents"},"currency":{"type":"string","example":"eur"},"status":{"type":"string","example":"paid"},"hostedInvoiceUrl":{"type":"object","nullable":true},"invoicePdfUrl":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","stripeInvoiceId","amountPaid","currency","status","createdAt"]},"FeatureFlagsDto":{"type":"object","properties":{"canAccessSearchSettings":{"type":"boolean","default":false},"canAccessOverview":{"type":"boolean","default":false},"canAccessDetail":{"type":"boolean","default":false},"canAccessMultiLlmDetail":{"type":"boolean","default":false},"canAccessCompetitorAnalysis":{"type":"boolean","default":false},"canAccessSources":{"type":"boolean","default":false},"canAccessRecommendations":{"type":"boolean","default":false},"canAccessHistory":{"type":"boolean","default":false},"canAccessWordCloud":{"type":"boolean","default":false},"canAccessTrends":{"type":"boolean","default":false},"canAccessTrackerProgress":{"type":"boolean","default":false},"canAccessFAQ":{"type":"boolean","default":false},"canAccessAlerts":{"type":"boolean","default":false},"canAccessExports":{"type":"boolean","default":false},"canAccessAgnostic":{"type":"boolean","default":false},"canAccessAgnosticSearchSettings":{"type":"boolean","default":false},"canAccessAgnosticOverview":{"type":"boolean","default":false},"canAccessAgnosticDetail":{"type":"boolean","default":false},"canAccessAgnosticProductComparison":{"type":"boolean","default":false},"canAccessAgnosticSources":{"type":"boolean","default":false},"canAccessAgnosticHistory":{"type":"boolean","default":false},"canAccessAgnosticWordCloud":{"type":"boolean","default":false},"canAccessAgnosticTrends":{"type":"boolean","default":false},"canAccessAgnosticTracker":{"type":"boolean","default":false},"canAccessAgnosticExports":{"type":"boolean","default":false},"canAccessAgnosticRecommendations":{"type":"boolean","default":false},"canAccessGoogleAiOverviews":{"type":"boolean","default":false},"canAccessActMode":{"type":"boolean","default":false},"canAccessAgent":{"type":"boolean","default":false},"canAccessMerged":{"type":"boolean","default":false},"canAccessPersonas":{"type":"boolean","default":false},"canAddPrivateLlmKeys":{"type":"boolean","default":false},"canAccessMcp":{"type":"boolean","default":true,"description":"Access to the PharmaGeo MCP server (open to every account unless turned off in the admin console)"},"canAccessRecoStandard":{"type":"boolean","default":false,"description":"Recommendation standard opened for this account (still requires RECO_STANDARD_ENABLED on the server)"},"canAccessAiSummary":{"type":"boolean","default":false,"description":"Access to the AI summary of the overview (GET …/reports/:id/ai-summary), enabled per account"},"canAccessMedicalRegulatoryAnalysis":{"type":"boolean","default":false},"canAccessCompetitiveTopicExtraction":{"type":"boolean","default":false}},"required":["canAccessSearchSettings","canAccessOverview","canAccessDetail","canAccessMultiLlmDetail","canAccessCompetitorAnalysis","canAccessSources","canAccessRecommendations","canAccessHistory","canAccessWordCloud","canAccessTrends","canAccessTrackerProgress","canAccessFAQ","canAccessAlerts","canAccessExports","canAccessAgnostic","canAccessAgnosticSearchSettings","canAccessAgnosticOverview","canAccessAgnosticDetail","canAccessAgnosticProductComparison","canAccessAgnosticSources","canAccessAgnosticHistory","canAccessAgnosticWordCloud","canAccessAgnosticTrends","canAccessAgnosticTracker","canAccessAgnosticExports","canAccessAgnosticRecommendations","canAccessGoogleAiOverviews"]},"UserProfileResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"b3b2a3e2-c5b3-4a6c-9b3a-7e8f1c2d3e4f"},"email":{"type":"string","example":"demo@aikka.io"},"name":{"type":"string","example":"Jane Doe"},"createdAt":{"type":"string","example":"2026-01-15T10:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-04-30T08:30:00.000Z"},"questionsUsed":{"type":"number","example":12,"description":"Questions consumed since last reset"},"lastReset":{"type":"string","example":"2026-04-01T00:00:00.000Z","description":"ISO timestamp of the last credit reset"},"role":{"type":"string","enum":["FREE","STARTER","PRO","MAX","ENTERPRISE"],"example":"STARTER","description":"PharmaGeo plan attached to the AccountProduct"},"productMode":{"type":"string","enum":["LEGACY","MERGED_ONLY"],"example":"MERGED_ONLY","description":"LEGACY = brand+agnostic+merged; MERGED_ONLY = merged only (new accounts)"},"credits":{"type":"number","example":100,"description":"Remaining credits on the AccountProduct"},"hasGoogle":{"type":"boolean","example":false,"description":"Whether the account is linked to Google sign-in"},"featureFlags":{"description":"Feature flags applied to this user (resolved against the plan template)","allOf":[{"$ref":"#/components/schemas/FeatureFlagsDto"}]},"recoStandardEnabled":{"type":"boolean","default":false,"description":"Recommendation standard switched on (categories, scores, product-blocked markets, dismissal reasons)."},"defaultMarket":{"type":"string","nullable":true,"example":"fr","description":"Default market of the account, used when a report has no market of its own"}},"required":["id","email","name","createdAt","updatedAt","questionsUsed","lastReset","role","productMode","credits","hasGoogle","defaultMarket"]},"UpdateReportDefaultsDto":{"type":"object","properties":{"company":{"type":"string","example":"Sanofi","description":"The client's company / lab name"},"brands":{"example":["Dupixent"],"description":"Brands the account tracks","type":"array","items":{"type":"string"}},"therapeuticAreas":{"example":["Atopic dermatitis"],"description":"Therapeutic areas / pathologies of interest","type":"array","items":{"type":"string"}},"ownedDomains":{"example":["dupixent.com"],"description":"Domains owned by the account","type":"array","items":{"type":"string"}},"ownedAccounts":{"example":["https://www.youtube.com/@SanofiUS","https://www.linkedin.com/company/sanofi","https://www.ncbi.nlm.nih.gov/myncbi/collections/123/"],"description":"Accounts and pages the company controls on third-party platforms (YouTube channel, LinkedIn page, PubMed collection), as full addresses with a path. A recommendation about one of them is classified Owned content; a recommendation about an account that is not listed here is Earned & reference. Not used for citation metrics, which rely on ownedDomains.","type":"array","items":{"type":"string"}},"unbrandedMarkets":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"Dupixent":["non-dtc"],"*":["jp"]},"description":"Unbranded policy: for each product (or \"*\" for every product of the account), the markets where recommendations must never name or promote it — only non-promotional actions remain (disease awareness, KOL engagement, third-party publication, regulatory databases, patient associations, open knowledge bases). Values: market codes (us, ca, gb, fr, de, es, it, jp, eu), \"*\" for every market, \"non-dtc\" for every market where the regulation does not allow direct-to-consumer advertising of prescription medicines (all but the US today), and \"!<market>\" for an exception, e.g. [\"*\", \"!us\"]. Added to the blocked markets of each report. Applied when the recommendation standard is enabled, from the next run."},"competitors":{"example":["Adtralza","Rinvoq"],"description":"Usual competitor products","type":"array","items":{"type":"string"}},"trackedProducts":{"example":["Dupixent"],"description":"Products tracked as named entities","type":"array","items":{"type":"string"}},"trackedTerms":{"example":["biologic","reimbursement"],"description":"Terms monitored for mention rates","type":"array","items":{"type":"string"}},"languages":{"example":["en","fr"],"description":"Preferred report languages (ISO codes)","type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","Claude"],"description":"Preferred AI models","type":"array","items":{"type":"string"}}}},"TherapeuticAreaItemDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Atopic Dermatitis"},"market":{"type":"object","nullable":true,"example":"France"},"recurringId":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","description":"RecurringAgnosticReport ID for this area"},"lastReportAt":{"type":"object","nullable":true,"example":"2026-04-15T10:00:00.000Z","description":"ISO timestamp of the most recent generated report (null if none yet)"}},"required":["pathology","recurringId"]},"TherapeuticAreasResponseDto":{"type":"object","properties":{"therapeuticAreas":{"description":"Therapeutic areas exposed by the public index account (only those with at least one report)","type":"array","items":{"$ref":"#/components/schemas/TherapeuticAreaItemDto"}}},"required":["therapeuticAreas"]},"PublicIndexSourceItemDto":{"type":"object","properties":{"title":{"type":"string","example":"Asthma symptoms — Mayo Clinic"},"domain":{"type":"string","example":"mayoclinic.org"},"ranking":{"type":"number","example":7,"description":"Number of times this source was cited in the report (rank by frequency)"},"reliability":{"type":"number","example":0.92,"description":"Reliability score (0–1)"},"link":{"type":"string","example":"https://www.mayoclinic.org/diseases-conditions/asthma"},"type":{"type":"string","example":"reference","description":"Source type (reference, news, forum, ...)"},"llmNames":{"example":["OpenAI","Perplexity"],"type":"array","items":{"type":"string"}}},"required":["title","domain","ranking","reliability","link","type","llmNames"]},"PublicIndexSourcesResponseDto":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/PublicIndexSourceItemDto"}}},"required":["sources"]},"PrivateLlmKeyResponseDto":{"type":"object","properties":{"provider":{"type":"string","example":"Anthropic","enum":["OpenAI","Perplexity","Anthropic","Gemini","Mistral","Grok"]},"last4":{"type":"string","example":"a1b2","description":"4 derniers caractères, pour reconnaissance visuelle."},"label":{"type":"object","nullable":true,"example":"Compte R&D"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastValidatedAt":{"type":"string","format":"date-time","nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"lastValidationError":{"type":"object","nullable":true,"example":"Provider rejected the credentials (HTTP 401)","description":"Message COURT et sanitisé — jamais le corps brut renvoyé par le provider."}},"required":["provider","last4","label","isActive","createdAt","updatedAt","lastValidatedAt","lastUsedAt","lastValidationError"]},"UpsertPrivateLlmKeyDto":{"type":"object","properties":{"apiKey":{"type":"string","description":"Clé API du provider, en clair. Transmise une seule fois : elle est chiffrée au repos et jamais renvoyée.","minLength":8,"maxLength":500,"example":"<votre-clé-provider>"},"label":{"type":"string","description":"Libellé d'affichage (ex. « Compte R&D »).","maxLength":120},"isActive":{"type":"boolean","description":"false = repli volontaire sur les clés entreprise (la clé reste stockée mais inutilisée). Absent ⇒ true.","default":true}},"required":["apiKey"]},"PrivateLlmKeyRevokedResponseDto":{"type":"object","properties":{"revoked":{"type":"boolean","example":true},"provider":{"type":"string","example":"Anthropic"},"revokedAt":{"type":"string","format":"date-time"}},"required":["revoked","provider","revokedAt"]},"PrivateLlmKeyTestResponseDto":{"type":"object","properties":{"valid":{"type":"boolean","example":true,"description":"true si le provider a accepté la clé stockée."},"key":{"$ref":"#/components/schemas/PrivateLlmKeyResponseDto"}},"required":["valid","key"]},"CheckoutSessionSummaryDto":{"type":"object","properties":{"id":{"type":"string","example":"cs_test_a1b2c3..."},"status":{"type":"string","nullable":true,"enum":["open","complete","expired"],"example":"complete","description":"Stripe Checkout session status"},"payment_status":{"type":"string","nullable":true,"enum":["paid","unpaid","no_payment_required"],"example":"paid","description":"Payment status reported by Stripe"},"amount_total":{"type":"object","nullable":true,"example":4900,"description":"Amount in the smallest currency unit (e.g. cents). Null if no payment was required."},"currency":{"type":"object","nullable":true,"example":"eur"},"customer_email":{"type":"object","nullable":true,"example":"demo@aikka.io"},"metadata":{"type":"object","nullable":true,"description":"Custom metadata attached to the session at creation","additionalProperties":{"type":"string"}},"client_reference_id":{"type":"object","nullable":true}},"required":["id"]},"PaymentStatusResponseDto":{"type":"object","properties":{"success":{"type":"boolean","example":true,"description":"true when the session is `complete` AND payment_status is `paid`"},"session":{"description":"Session summary when retrieval succeeded","allOf":[{"$ref":"#/components/schemas/CheckoutSessionSummaryDto"}]},"error":{"type":"string","description":"Error message when retrieval failed (success=false). Returns 200 with this body, not an HTTP error."}},"required":["success"]},"LegacyRecommendationStateDto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Same `recommendationKey` as the recommendations routes."},"status":{"type":"string","enum":["todo","in-progress","published","ignored"],"description":"One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1."},"favorite":{"type":"boolean"},"dismissReason":{"type":"string","enum":["not_feasible","not_relevant","already_done","regulatory","other","no_resource","not_allowed_compliance"],"nullable":true},"dismissNote":{"type":"string","nullable":true},"updatedAt":{"type":"string","example":"2026-10-12T09:30:00.000Z"}},"required":["recommendationKey","status","favorite","dismissReason","dismissNote","updatedAt"]},"LegacyRecommendationStateListDto":{"type":"object","properties":{"reportId":{"type":"string","description":"ID of the report run the states belong to. Equals the requested id for a single report; for a recurring series, it is the run whose recommendations the series currently serves. A recommendation that carries a standard keeps its state across the runs of the series; one without standard keeps it on its run."},"data":{"description":"Only recommendations that have a state. Any recommendation missing here is `{ status: \"todo\", favorite: false, dismissReason: null, dismissNote: null }`.","type":"array","items":{"$ref":"#/components/schemas/LegacyRecommendationStateDto"}}},"required":["reportId","data"]},"UpdateLegacyRecommendationStateDto":{"type":"object","properties":{"status":{"type":"string","enum":["todo","in-progress","published","ignored"],"description":"Workflow status. `published` means done. `ignored` hides the recommendation (not actionable). Moving to any status other than `ignored` clears `dismissReason` and `dismissNote`. One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1."},"favorite":{"type":"boolean","description":"Bookmark the recommendation for the team."},"dismissReason":{"type":"string","enum":["not_feasible","not_relevant","already_done","regulatory","other","no_resource","not_allowed_compliance"],"nullable":true,"description":"Why the recommendation is not actionable. Setting it also sets `status` to `ignored` (sending a different `status` in the same request is rejected). `null` clears it. Required to hide a recommendation that carries the recommendation standard on an account where it is enabled."},"dismissNote":{"type":"object","maxLength":1000,"nullable":true,"description":"Free-text comment explaining the dismissal. Setting it also sets `status` to `ignored`, like `dismissReason`. `null` clears it."}}},"LegacyRecommendationStateResponseDto":{"type":"object","properties":{"reportId":{"type":"string","description":"ID of the report run the state belongs to (see the list route)."},"data":{"$ref":"#/components/schemas/LegacyRecommendationStateDto"}},"required":["reportId","data"]},"UpdateRecoMarketRulesDto":{"type":"object","properties":{"rules":{"type":"object","nullable":true,"description":"Policy keyed by market code (\"fr\", \"us\"…) or \"*\" for all other markets, then by action kind (or \"untyped\"): true to show, false to hide. A cell left out follows the default of the regulatory reference for that market. null = back to the defaults everywhere.","example":{"fr":{"open-knowledge-base":false,"branded-public-site":true},"*":{"untyped":false}}}},"required":["rules"]},"CopyRecoMarketRulesDto":{"type":"object","properties":{"fromKind":{"type":"string","enum":["brand","agnostic","merged"],"description":"Family of the series to copy from"},"fromSeriesId":{"type":"string","description":"Series to copy the policy from"}},"required":["fromKind","fromSeriesId"]},"AgentMessageDto":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"Author of the turn"},"content":{"type":"string","description":"Message text"}},"required":["role","content"]},"AgentPersonaAssignmentDto":{"type":"object","properties":{"questionText":{"type":"string","description":"EN text of a custom question to replay per persona"},"personaIds":{"description":"Persona ids to replay this question for","type":"array","items":{"type":"string"}}},"required":["questionText","personaIds"]},"AgentDraftConfigDto":{"type":"object","properties":{"pathology":{"type":"string","description":"Canonical pathology"},"brand":{"type":"string","description":"Brand name — omit for market-only"},"brandAliases":{"type":"array","items":{"type":"string"}},"languages":{"example":["en","fr"],"type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","Claude","Gemini"],"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"ownedDomains":{"type":"array","items":{"type":"string"}},"trackedTerms":{"type":"array","items":{"type":"string"}},"customQuestionsPatient":{"type":"array","items":{"type":"string"}},"customQuestionsProfessional":{"type":"array","items":{"type":"string"}},"customQuestionsPayer":{"type":"array","items":{"type":"string"}},"customQuestionsCompetitor":{"type":"array","items":{"type":"string"}},"customQuestionsMarketPatient":{"description":"Market-scope (brand-agnostic) PATIENT questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"customQuestionsMarketProfessional":{"description":"Market-scope (brand-agnostic) PROFESSIONAL questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"customQuestionsMarketPayer":{"description":"Market-scope (brand-agnostic) PAYER questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"personaAssignments":{"type":"array","items":{"$ref":"#/components/schemas/AgentPersonaAssignmentDto"}}}},"AgentChatDto":{"type":"object","properties":{"messages":{"description":"Full conversation history, client-supplied each turn (stateless server)","type":"array","items":{"$ref":"#/components/schemas/AgentMessageDto"}},"draftConfig":{"description":"Current accumulated wizard config, echoed back and forth","allOf":[{"$ref":"#/components/schemas/AgentDraftConfigDto"}]},"conversationId":{"type":"string","description":"Saved conversation to resume — the turn is persisted into it (404 if not owned). Omit to start and persist a new conversation."}},"required":["messages"]},"CopilotMessageDto":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"Author of the turn"},"content":{"type":"string","description":"Message text"}},"required":["role","content"]},"ReportCopilotChatDto":{"type":"object","properties":{"messages":{"description":"Full conversation history, client-supplied each turn (stateless server). The last turn should be the user question about the report.","type":"array","items":{"$ref":"#/components/schemas/CopilotMessageDto"}},"conversationId":{"type":"string","description":"Saved conversation to resume — the turn is persisted into it (404 if not owned). Omit to start and persist a new conversation."}},"required":["messages"]},"ConsentDecisionDto":{"type":"object","properties":{}},"ActModeMessageV2Dto":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","maxLength":20000}},"required":["role","content"]},"ActModeDraftV2Dto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Key of the recommendation the draft belongs to. Use its legacyId from /v2/reports/{id}/recommendations when it is set: that is the key /v1 Act Mode uses, so the draft is shared with /v1. When legacyId is null (a recommendation repeated in another market of a multi-market report), use its id: the draft is then visible in /v2 only."},"contentMarkdown":{"type":"string","description":"Content of the draft, in Markdown; it may hold HTML"},"chatHistory":{"description":"Stored chat history; empty when none was saved","type":"array","items":{"$ref":"#/components/schemas/ActModeMessageV2Dto"}},"createdAt":{"type":"string","example":"2026-11-23T10:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-11-23T10:05:00.000Z"}},"required":["recommendationKey","contentMarkdown","chatHistory","createdAt","updatedAt"]},"ActModeDraftListV2Dto":{"type":"object","properties":{"data":{"description":"Most recently updated first","type":"array","items":{"$ref":"#/components/schemas/ActModeDraftV2Dto"}}},"required":["data"]},"SaveActModeDraftV2Dto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Key of the recommendation the draft belongs to. Use its legacyId from /v2/reports/{id}/recommendations when it is set: that is the key /v1 Act Mode uses, so the draft is shared with /v1. When legacyId is null (a recommendation repeated in another market of a multi-market report), use its id: the draft is then visible in /v2 only.","maxLength":500},"contentMarkdown":{"type":"string","description":"Content of the draft, in Markdown; it may hold HTML, such as the output of generate-content saved as is. Saving again under the same key replaces it.","maxLength":200000},"chatHistory":{"description":"Chat history kept with the draft. Absent = the stored history is kept.","maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/ActModeMessageV2Dto"}}},"required":["recommendationKey","contentMarkdown"]},"ActModeChatV2Dto":{"type":"object","properties":{"messages":{"description":"The conversation so far, oldest first, ending with the user message to answer. Roles are user and assistant only.","minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/ActModeMessageV2Dto"}},"recommendationContext":{"type":"string","description":"The recommendation the conversation is about: kind, title, rationale, steps, language, audience.","maxLength":10000}},"required":["messages"]},"ActModeChatReplyV2Dto":{"type":"object","properties":{"reply":{"type":"string","description":"Assistant reply, in Markdown"}},"required":["reply"]},"GenerateActModeContentV2Dto":{"type":"object","properties":{"recommendationKey":{"type":"string","description":"Key of the recommendation the draft belongs to. Use its legacyId from /v2/reports/{id}/recommendations when it is set: that is the key /v1 Act Mode uses, so the draft is shared with /v1. When legacyId is null (a recommendation repeated in another market of a multi-market report), use its id: the draft is then visible in /v2 only.","maxLength":500},"recommendationContext":{"type":"string","description":"The recommendation to carry out: kind, title, rationale, target question, keywords, language, audience, steps.","maxLength":10000},"additionalInstructions":{"type":"string","description":"Extra wishes for the content (tone, length, sources to favour).","maxLength":4000}},"required":["recommendationKey","recommendationContext"]},"ActModeGeneratedContentV2Dto":{"type":"object","properties":{"content":{"type":"string","description":"Generated content (HTML). It is a draft for your teams: it must go through your medical, legal and regulatory review (MLR/PRC) before any publication. It is not saved: save it as a draft to keep it."}},"required":["content"]},"ReportQueueV2Dto":{"type":"object","properties":{"position":{"type":"number","example":3,"description":"Rank among the reports of this account waiting for a slot (1 = first of them in line). Reports of other accounts may be waiting too, so this is a rank, not a start time."}},"required":["position"]},"V2ReportSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"title":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"rawStatus":{"type":"string","example":"done","description":"Status as the family stores it (/v1)"},"pathology":{"type":"string","nullable":true},"brand":{"type":"string","nullable":true},"languages":{"type":"array","items":{"type":"string"}},"llms":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"recurringId":{"type":"string","nullable":true,"description":"Series the report belongs to"},"queue":{"description":"Report waiting for a free slot: its rank among the waiting reports of this account","allOf":[{"$ref":"#/components/schemas/ReportQueueV2Dto"}]}},"required":["id","kind","title","status","rawStatus","pathology","brand","languages","llms","createdAt","finishedAt","recurringId"]},"V2ReportListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V2ReportSummaryDto"}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["data","total","page","limit"]},"ReportV2BrandDto":{"type":"object","properties":{"name":{"type":"string","example":"Dupixent"},"entityId":{"type":"string","nullable":true,"description":"Id of the brand in the entity table"}},"required":["name","entityId"]},"ReportProgressLlmV2Dto":{"type":"object","properties":{"llm":{"type":"string","example":"Mistral"},"collected":{"type":"number","example":40},"expected":{"type":"number","example":102}},"required":["llm","collected","expected"]},"ReportProgressV2Dto":{"type":"object","properties":{"phase":{"type":"string","enum":["answers","finishing"],"example":"answers","description":"answers = the models are still answering; finishing = every planned answer is in, the report is being analysed"},"collectedAnswers":{"type":"number","example":604,"description":"Answers collected so far, all models"},"expectedAnswers":{"type":"number","example":816,"description":"Answers planned for the run (questions x models asked)"},"byLlm":{"type":"array","items":{"$ref":"#/components/schemas/ReportProgressLlmV2Dto"}},"lastProgressAt":{"type":"string","nullable":true,"description":"Last time the run saved progress"},"estimatedFinishAt":{"type":"string","nullable":true,"description":"Estimated finish, from the pace of the slowest model on the current attempt; null when it cannot be estimated (a model has not answered yet, or the run is past its estimate)"},"stalled":{"type":"boolean","description":"True when, while the models are still answering, the run saved no progress for longer than the stall threshold (60 min by default)"}},"required":["phase","collectedAnswers","expectedAnswers","byLlm","lastProgressAt","estimatedFinishAt","stalled"]},"ReportV2LlmDto":{"type":"object","properties":{"id":{"type":"string","example":"OpenAI"},"answers":{"type":"number","description":"Answers collected from this model"},"failed":{"type":"number","description":"Answers this model failed to give (status failed)"},"notTriggered":{"type":"number","description":"Google AI Overviews / AI Mode only: questions where Google showed no AI answer (status not_triggered). Always 0 for the other models."},"failureDetails":{"description":"Why this model failed to answer some questions (one line per distinct reason). Absent when no reason was recorded.","type":"array","items":{"type":"string"}}},"required":["id","answers","failed","notTriggered"]},"TrackedTermV2Dto":{"type":"object","properties":{"term":{"type":"string","example":"atopic dermatitis"},"variants":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"fr":["dermatite atopique"],"de":["atopische Dermatitis","atopischen Dermatitis"]},"description":"Per answer language, the variants that also count as the term. Empty when none were given."}},"required":["term","variants"]},"ReportV2MetaDto":{"type":"object","properties":{"id":{"type":"string"},"pathology":{"type":"string","nullable":true,"example":"atopic dermatitis","description":"Null when the report has no pathology"},"brand":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReportV2BrandDto"}]},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"],"description":"Same values for the three families: partial = finished with part of the answers missing"},"rawStatus":{"type":"string","example":"done","description":"Status as the family stores it (/v1)"},"createdAt":{"type":"string","example":"2026-10-22T08:00:00.000Z"},"startedAt":{"type":"string","nullable":true,"example":"2026-10-22T08:00:05.000Z","description":"When the run started collecting answers; null while it waits in the queue"},"finishedAt":{"type":"string","nullable":true,"example":"2026-10-22T08:12:40.000Z","description":"When the run ended (done, partial, error or cancelled); null while it runs"},"updatedAt":{"type":"string","nullable":true,"description":"Last change of the stored report (brand: its creation, the table keeps no other date)"},"metadata":{"type":"object","additionalProperties":true,"nullable":true,"description":"Metadata stored on the run: the client metadata sent at creation and, in merged, the prompt version and other run labels"},"sourceReportId":{"type":"string","nullable":true,"description":"Merged: report a follow-up run was started from (re-run of a recommendation)"},"sourceRecommendationKey":{"type":"string","nullable":true,"description":"Merged: recommendation of the source report the follow-up run targets"},"queue":{"nullable":true,"description":"Report waiting for a free slot: its rank among the waiting reports of this account. Absent once it runs.","allOf":[{"$ref":"#/components/schemas/ReportQueueV2Dto"}]},"progress":{"nullable":true,"description":"Running merged report: answers collected so far against answers planned, and an estimated finish. Absent once the run is finished.","allOf":[{"$ref":"#/components/schemas/ReportProgressV2Dto"}]},"recurringId":{"type":"string","nullable":true,"description":"Series the report belongs to"},"markets":{"example":["fr","de"],"description":"Two-letter countries the questions were asked in. eu = legacy Europe zone of older reports, which may also hold countries no longer offered (hk, sa)","type":"array","items":{"type":"string"}},"languages":{"type":"array","example":["fr","de"],"items":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]}},"llms":{"type":"array","items":{"$ref":"#/components/schemas/ReportV2LlmDto"}},"competitors":{"description":"Competitors the report follows (empty when the family has none)","type":"array","items":{"type":"string"}},"trackedProducts":{"description":"Products the report tracks (empty when the family has none)","type":"array","items":{"type":"string"}},"trackedTerms":{"description":"Terms the report tracks, with the variants given per language (see termMentions in /metrics)","type":"array","items":{"$ref":"#/components/schemas/TrackedTermV2Dto"}},"ownedDomains":{"example":["dupixent.com"],"description":"Domains the client owns, used for owned sources","type":"array","items":{"type":"string"}},"ownedDomainGroups":{"type":"object","additionalProperties":{"type":"string","enum":["branded","unbranded"]},"example":{"pro.campus.sanofi/de":"unbranded","dupixent.com":"branded"},"description":"Group declared for each owned entry that has one, keyed by the normalized entry; empty when none was declared"},"sentimentEngine":{"type":"string","nullable":true,"description":"Model that scored the sentiment; runs scored by different models do not compare on sentiment. null = engine not recorded (unknown), not another engine"}},"required":["id","pathology","brand","status","rawStatus","createdAt","startedAt","finishedAt","recurringId","markets","languages","llms","competitors","trackedProducts","trackedTerms","ownedDomains","ownedDomainGroups","sentimentEngine"]},"EntityV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"e_3kQ9…","description":"Same id for the same product or organisation in every report and family (derived from its type and normalised name)"},"legacyId":{"type":"string","nullable":true,"description":"Id of the entity in the /v1 routes of this report"},"name":{"type":"string","example":"Dupixent"},"type":{"type":"string","enum":["product","organization","condition","other"]},"isBrand":{"type":"boolean"},"isCompetitor":{"type":"boolean"},"moleculeOf":{"type":"string","example":"Jakafi","description":"Merged: for a molecule, the brand it belongs to, as the run stored it"},"variants":{"example":["Jakafi XR"],"description":"Merged: other names of the entity found in the answers and counted with it","type":"array","items":{"type":"string"}},"sentiment":{"type":"string","example":"neutral","description":"Merged: dominant sentiment of the answers that mention the entity, as the run stored it"}},"required":["id","legacyId","name","type","isBrand","isCompetitor"]},"ReportV2Dto":{"type":"object","properties":{"schemaVersion":{"type":"number","example":2},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"meta":{"$ref":"#/components/schemas/ReportV2MetaDto"},"extensions":{"type":"object","additionalProperties":true,"description":"What only one family has (merged competitive synthesis, agnostic product tracking, brand overview…), under merged, agnostic or brand. Common fields never move here. Merged and brand reports carry wordCloud, trending and medicalRegulatory. wordCloud has the same item shape in both families: { term, weight, byLlm, language, market } (weight is a number, market null when the run did not record it), counted per language and market, without sentiment. In brand, weight is the sum over the models of the /v1 cloudwords counts, an engine with no count being left out of byLlm and a term no engine counted being left out (a whole number, possibly written \"15+\", \"~8\", \"≈8\" or with a thousands separator such as \"1,250\"; any other form, such as a range, a bound \"<5\", a negative or decimal value or \"8 times\", counts as no count). The two measures differ: in merged, weight counts the word in the answers of the run as the engines wrote them (answers to personas left out), per language and market, at most 60 terms each, words of fewer than 4 letters, numbers and common words (lists for en, fr, de, es, it, pt, nl, all applied, as an answer may be written in another language than its question) left out; in brand, one OpenAI utility model reads the questions (in English) and answers of each engine, possibly truncated, and estimates how often the word appears; 20 to 40 terms in the report language are requested per engine, language and market, merged with no overall cap. The byLlm keys are the engines whose answers were read, not the model that estimated; an engine whose word cloud failed is absent. The brand name, present in the default questions, weighs more than in merged. Do not compare a brand weight with a merged one. trending and medicalRegulatory keep a shape per family: in brand, the per-language items of the /v1 trending-questions and medical-regulatory-analysis routes, as stored (items without a language are left out). The trending questions are those a model with web search reports as trending, with its sources: they are not real prompts of patients or professionals. Agnostic reports have none. Also kept from /v1: brand productNamesByLanguage (language → names) and positiveReviews (\"3/6\") on each overview block; brand and agnostic recommendationSummaries ({ kind, llm, language, market, summary[] }: the summary_original of /v1 per model and language); agnostic weightedCoMentions ({ entity1Id, entity2Id, market, language, frequency, weightedFrequency } as stored per country and language); merged regulatoryWithheld (recommendations withheld for a regulatory reason, as stored)."},"entities":{"description":"Entities that answers mention and competitor questions point to","type":"array","items":{"$ref":"#/components/schemas/EntityV2Dto"}}},"required":["schemaVersion","kind","meta","extensions","entities"]},"V2PeriodReportDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"createdAt":{"type":"string","description":"When the report was created (ISO date-time)"}},"required":["id","status","createdAt"]},"V2PeriodExcludedDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"createdAt":{"type":"string","description":"When the report was created (ISO date-time)"},"reason":{"type":"string","enum":["not_done","not_found"],"description":"not_done: left out because other reports of the period are done; not_found: archived or deleted while the period was read"}},"required":["id","status","createdAt","reason"]},"V2PeriodDto":{"type":"object","properties":{"seriesId":{"type":"string","description":"The series id the request was made with"},"reportIds":{"description":"The reports read together, oldest first","type":"array","items":{"type":"string"}},"reports":{"description":"The reports read together, with their status: done ones, or every report of the period when none is done","type":"array","items":{"$ref":"#/components/schemas/V2PeriodReportDto"}},"excluded":{"description":"Reports of the period left out, with the reason","type":"array","items":{"$ref":"#/components/schemas/V2PeriodExcludedDto"}},"fallback":{"type":"boolean","description":"true when no report of the period is done: every report was read, whatever its status (running, error, cancelled…), as /v1 does"},"from":{"type":"string","nullable":true,"description":"Start of the period asked (from), or null"},"to":{"type":"string","nullable":true,"description":"End of the period asked (to), or null"}},"required":["seriesId","reportIds","reports","excluded","fallback","from","to"]},"BilingualTextDto":{"type":"object","properties":{"original":{"type":"string","description":"Text as written or answered, in its own language"},"en":{"type":"string","nullable":true,"description":"English text when the original is already English; null otherwise (no translation is made)"}},"required":["original","en"]},"QuestionDetailV2Dto":{"type":"object","properties":{"expectedEntityTypes":{"example":["PRODUCT","MOLECULE"],"description":"Entity types the answer is expected to name","type":"array","items":{"type":"string"}},"generatedBy":{"type":"string","example":"OpenAI","description":"Model that generated or validated the question (not the models asked: see llms)"}}},"QuestionV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"q_7fz0abQ1x2c3d4e5","description":"Stable id derived from the question content and its market"},"legacyId":{"type":"string","nullable":true,"description":"Id of the question in the /v1 routes, to follow a series across the switch"},"text":{"$ref":"#/components/schemas/BilingualTextDto"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"de"},"languageSource":{"type":"string","enum":["client","detected","fallback"],"description":"client = sent or configured by the client, detected = detected, fallback = en for lack of anything better"},"market":{"type":"string","example":"de","description":"The one two-letter country this question was asked in"},"scope":{"type":"string","enum":["agnostic","brand"]},"category":{"type":"string","enum":["patient","professional","payer","competitive"]},"competitor":{"type":"string","nullable":true,"description":"Competitor a competitive question compares the brand with, as asked. It enters the question id."},"competitorId":{"type":"string","nullable":true,"description":"Entity id of the competitor a competitive question compares the brand with"},"tags":{"type":"array","items":{"type":"string"}},"specificLlms":{"nullable":true,"example":null,"description":"Models and engines the client set on this question; null = the report llms","type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","GoogleAIO"],"description":"Models and engines this question was asked to: specificLlms when set, else the report llms","type":"array","items":{"type":"string"}},"intent":{"type":"string","nullable":true,"example":"treatment_decision","description":"Intent of the question when the report records it (merged, agnostic)"},"origin":{"type":"string","enum":["client","generated","trending"],"nullable":true,"example":"client","description":"Where the question comes from: client (written or chosen by the client), generated, trending; null when the report does not record it (older brand runs)"},"isProductTrigger":{"type":"boolean","nullable":true,"description":"Question written to make a product appear (agnostic); null when not recorded"},"detail":{"description":"Agnostic: what /v1 gives on the question beyond the common fields. Absent when the run stored none of it.","allOf":[{"$ref":"#/components/schemas/QuestionDetailV2Dto"}]}},"required":["id","legacyId","text","language","languageSource","market","scope","category","competitor","competitorId","tags","specificLlms","llms","intent","origin","isProductTrigger"]},"QuestionV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionV2Dto"}}},"required":["nextCursor","total","data"]},"AnswerSentimentV2Dto":{"type":"object","properties":{"label":{"type":"string","enum":["positive","neutral","negative"]},"score":{"type":"number","minimum":-1,"maximum":1}},"required":["label","score"]},"MentionDetailV2Dto":{"type":"object","properties":{"entityId":{"type":"string","description":"Entity id (as in mentions)"},"text":{"type":"string","nullable":true,"description":"Text the detection found"},"sourceSpan":{"type":"string","nullable":true,"description":"Passage of the answer that triggered the detection (name, molecule, code)"},"matchedBy":{"type":"string","nullable":true,"example":"molecule","description":"How the entity was matched: name or molecule; null when the run did not record it"},"confidence":{"type":"number","nullable":true,"description":"Confidence of the detection, 0 to 1"}},"required":["entityId","text","sourceSpan","matchedBy","confidence"]},"CitationDetailV2Dto":{"type":"object","properties":{"sourceId":{"type":"string","description":"Source id (as in citations)"},"title":{"type":"string","nullable":true,"description":"Title the model gave this source in this answer"},"type":{"type":"string","nullable":true,"example":"Guideline","description":"Type the model gave this source in this answer, as stored (Regulatory, Guideline, PubMed…), before the V2 classification of /sources"},"reliability":{"type":"number","nullable":true,"description":"Reliability given in this answer, 0 to 1 (/sources keeps the highest)"},"domainCategory":{"type":"string","nullable":true,"example":"owned_domains","description":"Domain category stored by the run (brand and agnostic)"},"pageType":{"type":"string","nullable":true,"example":"prescribing_information","description":"Page type stored by the run (brand and agnostic)"}},"required":["sourceId","title","type","reliability","domainCategory","pageType"]},"AnswerDetailV2Dto":{"type":"object","properties":{"flags":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Flags of the answer: agnostic offLabelRisk and noProductSignal, brand ownedPresent"},"mentionDetails":{"description":"Each detection of an entity in the answer (agnostic)","type":"array","items":{"$ref":"#/components/schemas/MentionDetailV2Dto"}},"mentionCounts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Entity id → number of times the answer names it"},"citationCounts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Source id → number of times the answer cites it (citations lists it once)"},"citationDetails":{"description":"Each citation as the run stored it in this answer (brand and agnostic)","type":"array","items":{"$ref":"#/components/schemas/CitationDetailV2Dto"}},"competitorSentiment":{"type":"object","additionalProperties":{"type":"string"},"example":{"Jakafi":"positive"},"description":"Competitor name → sentiment of the answer toward it (merged)"},"score":{"type":"number","description":"Score of the answer, 0 to 100, as /v1 (brand, also on persona answers)"},"positionIndex":{"type":"number","description":"Position of the brand in the answer, 0 to 1 (brand)"},"pairwise":{"type":"number","description":"Brand against the competitor of a competitive answer: 1 better, 0 even, -1 worse (brand)"},"wikiPresent":{"type":"boolean","description":"A Wikipedia page is cited (brand)"},"communityPresent":{"type":"boolean","description":"A community page is cited (brand)"},"pageTypes":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"owned, wiki, community → page types cited (brand)"},"voiceWeights":{"type":"object","additionalProperties":{"type":"number"},"example":{"e_3kQ9":0.81},"description":"Entity id → weight of the answer for that product in weightedShareOfVoice of /metrics: authority of its sources times the confidence of the detection, as /v1 agnostic metrics/products (agnostic, products /v1 counts only)"}}},"AnswerV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Stable id derived from the question, the model and the persona; reportId:id when a series is read over a period"},"reportId":{"type":"string","description":"Only when a series is read over a period: the report the answer comes from"},"legacyId":{"type":"string","nullable":true,"description":"Key of the answer in the /v1 routes; null for an answer that was never collected. When a series is read over a period, it repeats once per report: use id"},"questionId":{"type":"string"},"market":{"type":"string","example":"de","description":"Two-letter country"},"llm":{"type":"string","example":"OpenAI"},"personaId":{"type":"string","nullable":true},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]},"scope":{"type":"string","enum":["agnostic","brand"]},"category":{"type":"string","enum":["patient","professional","payer","competitive"]},"text":{"$ref":"#/components/schemas/BilingualTextDto"},"status":{"type":"string","enum":["ok","failed","not_triggered"],"description":"ok = answer collected; failed = no answer (see failureReason); not_triggered = Google AI Overviews / AI Mode showed no AI answer for this question: not a failure, and left out of every rate except engineAppearance"},"failureReason":{"type":"string","enum":["not_collected","empty_answer","pending","engine_error"],"nullable":true,"description":"not_collected = the model gave no answer; empty_answer = the answer was empty; pending = the run is still collecting answers; engine_error = no answer from this model for this question: the call failed (after retries when they could help) or collection from this model stopped before reaching it; failureDetail says which"},"failureDetail":{"type":"string","nullable":true,"example":"Mistral gave no usable answer to this batch of questions after 3 attempts (provider error 504).","description":"Why the answer failed, when the run recorded it"},"sentiment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AnswerSentimentV2Dto"}]},"reliability":{"type":"number","nullable":true,"minimum":0,"maximum":1},"brandMentioned":{"type":"boolean","nullable":true,"description":"Null on a report without brand, or when the report did not measure it"},"mentions":{"description":"Entity ids mentioned by the answer. On a brand report only the brand is measured: competitors are not detected in its answers.","type":"array","items":{"type":"string"}},"moleculeOnly":{"description":"Entity ids of mentions this answer makes only through the molecule (no brand name, alias or code). Absent on reports detected before product sheets.","type":"array","items":{"type":"string"}},"citations":{"description":"Source ids cited by the answer","type":"array","items":{"type":"string"}},"collectedAt":{"type":"string"},"detail":{"description":"What /v1 gives on this answer beyond the common fields, as the run stored it. Absent when the run stored none of it.","allOf":[{"$ref":"#/components/schemas/AnswerDetailV2Dto"}]}},"required":["id","legacyId","questionId","market","llm","personaId","language","scope","category","text","status","sentiment","reliability","brandMentioned","mentions","citations","collectedAt"]},"AnswerV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnswerV2Dto"}}},"required":["nextCursor","total","data"]},"RecommendationEvidenceV2Dto":{"type":"object","properties":{"answerIds":{"type":"array","items":{"type":"string"}},"sourceIds":{"type":"array","items":{"type":"string"}}},"required":["answerIds","sourceIds"]},"RecommendationEffortV2Dto":{"type":"object","properties":{"value":{"type":"number","minimum":1,"maximum":5,"description":"Effort = min(5, base + review modifier + teams modifier)"},"base":{"type":"number","minimum":1,"maximum":3,"description":"1 = change to existing pages (up to 5) or a template-level fix; 2 = one new page or asset, or an asset on an account the brand controls; 3 = programme, more than 5 pages, or a third-party source the brand does not control"},"reviewModifier":{"type":"number","minimum":0,"maximum":1,"description":"+1 when Medical/MLR review is required"},"teamsModifier":{"type":"number","minimum":0,"maximum":1,"description":"+1 when a second team or an external partner is needed"},"label":{"type":"string","enum":["quick-win","moderate","major-project"],"description":"quick-win (1-2), moderate (3), major-project (4-5)"}},"required":["value","base","reviewModifier","teamsModifier","label"]},"RecommendationRegulatoryNoteV2Dto":{"type":"object","properties":{"text":{"type":"string","description":"The note shown with the recommendation, in English (merged reports: in French)"},"code":{"type":"string","enum":["restricted","untyped","policy"],"nullable":true,"description":"restricted: the action type is restricted in this market. untyped: the engine gave no action type. policy: the action is not allowed by default in this market, but the report policy set by the client shows it."},"regime":{"type":"string","nullable":true,"description":"Promotion regime applied (FR, EU, US…)"},"sourceRef":{"type":"string","nullable":true,"description":"Legal basis of the regime"},"detail":{"type":"string","nullable":true},"reviewStatus":{"type":"string","enum":["unreviewed","reviewed"],"nullable":true,"description":"Legal review status of the regime entry in our reference. unreviewed: not yet checked by a lawyer."},"defaultState":{"type":"string","enum":["show","flag","hide"],"nullable":true,"description":"State of this action type in this market under our reference (hide = not allowed, flag = restricted)"},"state":{"type":"string","enum":["show","flag","hide"],"nullable":true,"description":"State applied to this report, the report policy included"}},"required":["text","code","regime","sourceRef","detail","reviewStatus","defaultState","state"]},"RecommendationStandardV2Dto":{"type":"object","properties":{"stableId":{"type":"string","description":"Identity of the recommendation across runs of a series (brand + market + category + target source + topic [+ target URL]). Status and dismissal follow this id."},"topic":{"type":"string"},"category":{"type":"string","enum":["technical-foundation","owned-content","earned-reference","community-ugc"],"description":"Where the action happens"},"subType":{"type":"string","enum":["create","optimize"],"nullable":true,"description":"owned-content only"},"owner":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"],"description":"Primary team that executes the action"},"contributors":{"type":"array","items":{"type":"string","enum":["web-it","brand-content","medical","comms-pr"]}},"review":{"type":"string","enum":["mlr","light","none"]},"gapType":{"type":"string","enum":["coverage","citation","losing-ground","engine","sentiment-accuracy","label-discrepancy"],"nullable":true},"targetMetric":{"type":"string","enum":["ai-visibility","citation-share","share-of-voice","net-sentiment"]},"audience":{"type":"string","enum":["hcp","patient","payer"],"nullable":true},"impact":{"type":"number","nullable":true,"description":"Impact 0-100 = 100 × (0.6 × uplift + 0.4 × reach) × confidence; null = insufficient data"},"effort":{"$ref":"#/components/schemas/RecommendationEffortV2Dto"},"priority":{"type":"number","nullable":true,"description":"Priority = impact × (1.1 − 0.1 × effort), one decimal"},"quadrant":{"type":"string","enum":["quick-win","strategic-project","fill-in","later"],"nullable":true,"description":"High impact = 60+, low effort = 3 or less"},"tier":{"type":"string","enum":["high","medium","low"],"nullable":true,"description":"high = priority 60+ (at most 3 per owner per market and language), medium = 40-59, low = below 40; null = not ranked"},"insufficientData":{"type":"boolean"},"ranked":{"type":"boolean","description":"false for label discrepancies (routed to Medical) and insufficient data"},"uplift":{"type":"number","nullable":true,"description":"Modelled uplift 0-1"},"reach":{"type":"number","nullable":true,"description":"Share of weighted tracked prompts affected, 0-1"},"confidence":{"type":"number","description":"1.0, 0.8 or 0.6"},"gapShare":{"type":"number","nullable":true,"description":"Share of the answers in scope where the gap is observed, 0-1"},"evidenceQuestionIds":{"type":"array","items":{"type":"string"}},"evidenceLlms":{"type":"array","items":{"type":"string"}},"cycles":{"type":"number","description":"Number of runs of the series where the gap was seen"},"upliftBasis":{"type":"string","enum":["target","comparable","neutral"],"nullable":true,"description":"Citation rate behind the uplift. target: how often AI engines cite the target source. comparable: a new asset (no citations yet) is scored on comparable sources — same source type, competitor pages for a brand page. neutral: no target source."},"actionKind":{"type":"string","enum":["branded-public-site","branded-hcp-site","unbranded-disease-awareness","medical-information-service","kol-engagement","third-party-publication","regulatory-database","patient-association","open-knowledge-base","patient-support-programme"],"nullable":true,"description":"Type of action, as classified against the promotion rules of the market. null when the engine gave none."},"regulatoryNote":{"nullable":true,"description":"Regulatory note of the recommendation in its market, with the legal review status of the reference. null when the action needs none.","allOf":[{"$ref":"#/components/schemas/RecommendationRegulatoryNoteV2Dto"}]}},"required":["stableId","topic","category","subType","owner","contributors","review","gapType","targetMetric","audience","impact","effort","priority","quadrant","tier","insufficientData","ranked","uplift","reach","confidence","gapShare","evidenceQuestionIds","evidenceLlms","cycles","upliftBasis","actionKind","regulatoryNote"]},"RecommendationDetailV2Dto":{"type":"object","properties":{"weakAreaAddressed":{"type":"string","example":"Overall Score","description":"Weak area the recommendation addresses (/v1 weak_area_addressed, merged weakArea)"},"targetSource":{"type":"string","example":"Regulatory","description":"Source the recommendation targets, as stored: a source type (brand, agnostic) or a URL or domain (merged), kept even when no answer cites it (targetSourceId is then null)"},"expectedImpact":{"description":"Expected impact","allOf":[{"$ref":"#/components/schemas/BilingualTextDto"}]},"context":{"description":"Context of the recommendation (brand, agnostic)","allOf":[{"$ref":"#/components/schemas/BilingualTextDto"}]},"evidenceLinks":{"description":"Every source address the recommendation gives, also the ones no answer cites (evidence.sourceIds only lists the cited ones)","type":"array","items":{"type":"string"}},"storedMarket":{"type":"string","example":"jp","description":"Country stored on the recommendation when it is not a country of the report (market is then null)"},"questionLink":{"type":"object","additionalProperties":true,"description":"Merged: link to the question the recommendation answers, as stored"},"questionChoice":{"type":"object","additionalProperties":true,"description":"Merged: how the targeted questions were chosen, as stored"},"productStageNote":{"type":"string","description":"Merged: note on the product status"}}},"RecommendationV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Current recommendation id, kept so that statuses and reruns keep working"},"reportId":{"type":"string","description":"Only when a series is read over a period: the report the recommendation comes from (the last one of the period with recommendations)"},"legacyId":{"type":"string","nullable":true,"description":"Key of the recommendation in the /v1 routes"},"kind":{"type":"string","enum":["geo","aeo","owned-domain"]},"market":{"type":"string","nullable":true,"description":"Two-letter country; null = applies to the whole report"},"language":{"type":"string","nullable":true,"enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]},"llm":{"type":"string","nullable":true},"priority":{"type":"string","enum":["high","medium","low"],"nullable":true,"description":"null when the model gave no priority (never invented)"},"priorityScore":{"type":"number","example":82,"description":"Priority 0–100, deterministic and comparable across the recommendations of the report: always within its priority band (high 70–100, medium 40–69, low 10–39), then feasibility for the lab, selectivity, rank and actionability"},"title":{"$ref":"#/components/schemas/BilingualTextDto"},"rationale":{"$ref":"#/components/schemas/BilingualTextDto"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/BilingualTextDto"}},"targetSourceId":{"type":"string","nullable":true},"evidence":{"$ref":"#/components/schemas/RecommendationEvidenceV2Dto"},"standard":{"nullable":true,"description":"Recommendation standard (category, labels, impact / effort / priority, tier). null on reports generated before it.","allOf":[{"$ref":"#/components/schemas/RecommendationStandardV2Dto"}]},"detail":{"description":"What /v1 gives on the recommendation beyond the common fields. Absent when the run stored none of it.","allOf":[{"$ref":"#/components/schemas/RecommendationDetailV2Dto"}]},"tags":{"example":["efficacy","safety"],"description":"Tags (lowercase) of the questions whose answers justify the recommendation: the answers it points to, and those citing one of its sources in its market, language and model. Empty when there are none.","type":"array","items":{"type":"string"}},"audiences":{"type":"array","example":["patient"],"description":"Audiences: the one set by the recommendation standard when there is one, otherwise those of the questions whose answers justify the recommendation. Empty when there are none.","items":{"type":"string","enum":["hcp","patient","payer"]}}},"required":["id","legacyId","kind","market","language","llm","priority","priorityScore","title","rationale","steps","targetSourceId","evidence","standard","tags","audiences"]},"RecommendationV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationV2Dto"}}},"required":["nextCursor","total","data"]},"CitationCountsV2Dto":{"type":"object","properties":{"total":{"type":"number","description":"Answers citing the source"},"byMarket":{"type":"object","additionalProperties":{"type":"integer"},"example":{"de":2}},"byLanguage":{"type":"object","additionalProperties":{"type":"integer"},"example":{"de":2}},"byLlm":{"type":"object","additionalProperties":{"type":"integer"},"example":{"OpenAI":1,"Gemini":1}}},"required":["total","byMarket","byLanguage","byLlm"]},"SourceCitationsV2Dto":{"type":"object","properties":{"total":{"type":"number","description":"Answers citing the source"},"byMarket":{"type":"object","additionalProperties":{"type":"integer"},"example":{"de":2}},"byLanguage":{"type":"object","additionalProperties":{"type":"integer"},"example":{"de":2}},"byLlm":{"type":"object","additionalProperties":{"type":"integer"},"example":{"OpenAI":1,"Gemini":1}},"unattributed":{"description":"Citations an older report recorded without the answer that made them (brand reports). Counted apart, never in total. Omitted under any of the market, language, llm, scope, category or tags filters.","allOf":[{"$ref":"#/components/schemas/CitationCountsV2Dto"}]}},"required":["total","byMarket","byLanguage","byLlm"]},"SourceV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Stable id derived from the normalised url"},"url":{"type":"string"},"title":{"type":"string","nullable":true},"domain":{"type":"string","example":"nice.org.uk"},"type":{"type":"string","enum":["regulatory","guideline","hta","pubmed","cochrane","clinical_trials","society","manufacturer","knowledge_base","news","other"],"example":"hta","description":"Same list for the three families: manufacturer for a domain the client owns, else from the known domain, else the label the model gave when it is one of them, else other. hta = publications of a health technology assessment body (HAS, NICE, G-BA, IQWiG, ICER…), except their clinical guidelines (NICE NG/CG, or a page the model labels guideline), which are guideline"},"owned":{"type":"boolean","description":"The source is on a domain or URL prefix the client owns"},"ownedGroup":{"type":"string","enum":["branded","unbranded"],"description":"Group declared for the longest owned entry the source matches; absent when that entry has no group"},"reliability":{"type":"number","nullable":true,"minimum":0,"maximum":1},"citations":{"$ref":"#/components/schemas/SourceCitationsV2Dto"}},"required":["id","url","title","domain","type","owned","reliability","citations"]},"SourceV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SourceV2Dto"}}},"required":["nextCursor","total","data"]},"RateV2Dto":{"type":"object","properties":{"value":{"type":"number","nullable":true,"description":"num / den; null when den is 0 (no data, not zero)"},"num":{"type":"number"},"den":{"type":"number"}},"required":["value","num","den"]},"SentimentCountsV2Dto":{"type":"object","properties":{"positive":{"type":"number"},"neutral":{"type":"number"},"negative":{"type":"number"},"unscored":{"type":"number","description":"Answers collected without sentiment"}},"required":["positive","neutral","negative","unscored"]},"ReliabilityV2Dto":{"type":"object","properties":{"value":{"type":"number","nullable":true,"minimum":0,"maximum":1},"n":{"type":"number","description":"Answers the mean is computed over"}},"required":["value","n"]},"OwnedByGroupV2Dto":{"type":"object","properties":{"branded":{"description":"Pairs whose source matches an owned entry declared branded, over total; absent when the report declares no branded entry","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"unbranded":{"description":"Pairs whose source matches an owned entry declared unbranded, over total; absent when the report declares no unbranded entry","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]}}},"DomainCountV2Dto":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"number"}},"required":["domain","count"]},"CitationMetricsV2Dto":{"type":"object","properties":{"total":{"type":"number","description":"total = (answer, source) pairs over the answers collected: a source cited by three answers counts three times, cited twice by one answer counts once. owned = pairs whose source is on an owned domain, over total. ownedByGroup.branded / ownedByGroup.unbranded = pairs whose source matches an owned entry declared with that group (longest matching entry), over total; one key per group the report declares, empty when the report declares no group (never 0 for an undeclared group); an owned entry declared without a group counts in owned only. topDomains = the 10 domains with most pairs. Citations an older report recorded without the answer that made them are not counted."},"owned":{"$ref":"#/components/schemas/RateV2Dto"},"ownedByGroup":{"example":{"unbranded":{"value":0.1,"num":1,"den":10}},"description":"One key per owned group the report declares; empty object when it declares none","allOf":[{"$ref":"#/components/schemas/OwnedByGroupV2Dto"}]},"topDomains":{"type":"array","items":{"$ref":"#/components/schemas/DomainCountV2Dto"}}},"required":["total","owned","ownedByGroup","topDomains"]},"MetricsV2Dto":{"type":"object","properties":{"answers":{"type":"number","description":"Answers collected (status ok) in the slice. Without personaId, persona answers are not counted: every figure below is computed over the answers without persona. With personaId, every figure is computed over the answers of that persona only."},"failed":{"type":"number","description":"Answers a model never gave or gave empty (status failed) in the slice. They enter no other figure."},"notTriggered":{"type":"number","description":"Google AI Overviews / AI Mode questions where Google showed no AI answer (status not_triggered) in the slice. Not a failure: Google chose not to answer. They enter no other figure than engineAppearance."},"engineAppearance":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"example":{"GoogleAIO":{"value":0.6,"num":6,"den":10}},"description":"Per Google engine (GoogleAIO, GoogleAIMode) present in the slice. num = questions where Google showed an AI answer (status ok); den = num + questions where it showed none (status not_triggered). Failed collections are left out. It is the /v1 engineAppearance rate. Empty when the slice has no Google engine. Filter llm and language for the per-language rate."},"brandPresence":{"description":"num = brand-free (scope agnostic) answers collected that mention the brand; den = brand-free answers collected for which the mention was measured. Brand questions name the brand by construction and are left out. value is null when den is 0: a report without brand, no brand-free answer in the slice, or an older agnostic or brand report, which never measured the mention answer by answer (its /v1 visibility scores stay in extensions).","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"brandPresenceByIntent":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"example":{"treatment":{"value":0.4,"num":8,"den":20},"context":{"value":0.25,"num":5,"den":20}},"description":"brandPresence split by the intent of the question (merged: treatment, context), as the /v1 merged brandPresence.byIntent: same num and den, restricted to the answers of questions carrying that intent. brandPresence itself stays computed over every brand-free answer. A key is absent when no measured brand-free answer belongs to a question of that intent; the field is absent when no such answer exists in the slice (no question with an intent, a report without brand, an agnostic report)."},"brandVisibility":{"description":"num = answers collected of both scopes that mention the brand; den = answers collected of both scopes for which the mention was measured. It is the /v1 aiVisibilityScore of brand reports (answers naming the product, under its names for the answer language, over answers with text), pooled over the slice. Brand questions name the brand by construction, so it runs higher than brandPresence. value is null when den is 0: a report without brand or an agnostic report. On an older brand report, a question asked twice to the same model counts once, and an answer kept only in English is not counted: the figure can then differ from /v1 by a point or two.","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"shareOfVoice":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"description":"Per entity id. num = brand-free answers collected that mention the entity; den = the sum of num over the entities followed (the brand, its competitors and every product entity, as in merged /v1). Values add up to 1 when den > 0. Unlike agnostic /v1 metrics/products, answers are not weighted by source authority and molecules count as products, so a brand and its molecule are two entities. On agnostic reports, weightedShareOfVoice gives the weighted share of /v1 agnostic metrics/products."},"weightedShareOfVoice":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"description":"Agnostic reports only (absent on merged and brand reports, whose /v1 share of voice counts answers as shareOfVoice does). The share of voice of /v1 agnostic metrics/products, computed the same way: each brand-free answer (scope agnostic) that names a product weighs, for that product, the authority of its sources (mean over the sources of the answer of Regulatory 1, Guideline 0.92, Cochrane 0.9, PubMed 0.88, ClinicalTrials 0.84, Society 0.78, News and other types 0.5, each source weighted by its reliability; 0.3 without source) times the confidence of the detection (the highest when the answer names the product several times). Per entity id: num = the sum of the weights of the product over the answers of the slice; den = the sum over every product, so values add up to 1 when den > 0. num and den are sums of weights, not counts of answers: they are decimals. The entities are those /v1 detected as products: molecules and competitors detected as such are not counted, as in /v1. A slice (market, language) gives the /v1 shareOfVoice of the same segment; other slices and filters pool the weights of their segments, as /v1 pools the runs of a series. Each answer carries its weights in detail.voiceWeights. Brand-free follows the /v2 scope, as shareOfVoice: a question sent with scope brand is left out, where /v1 counts it when its run stored it as brand-free. On a report that mixes brand and brand-free questions in one country and language, the values can therefore differ from /v1: the weights of the brand questions leave the num and den of /v2. A segment made only of brand questions has no weighted share in /v2, where /v1 shows one. On a report without question in scope brand, the values are those of /v1. Absent is not 0: the field is absent on merged and brand reports, and an entity /v1 does not count as a product is not listed."},"appearance":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"description":"Per entity id, for the same entities as shareOfVoice. num = brand-free answers collected that mention the entity; den = brand-free answers collected. It is the /v1 appearanceRate of agnostic reports, pooled over the slice. Unlike shareOfVoice, the rates do not add up to 1."},"appearanceViaMolecule":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"description":"Per entity id, for the entities of appearance. num = brand-free answers collected that name the entity only through its molecule (no brand name, alias or code); den = brand-free answers collected that mention the entity. appearance × value = appearance through the molecule alone. Absent on reports detected before product sheets marked how each mention was found."},"termMentions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RateV2Dto"},"example":{"atopic dermatitis":{"value":0.85,"num":17,"den":20}},"description":"Per tracked term, under the term as configured. num = answers collected of both scopes that cite the term; den = answers collected. For a term without variants it is the /v1 merged termMentions rate, pooled over the slice; the /v1 brand and agnostic sections match differently (accents and ® kept, runs of spaces and long dashes folded) and can differ slightly. Variants add the answers that cite only a variant. An answer cites the term when its text contains the term or one of the variants given for the answer language (trackedTerms entries { term, variants: { fr: [...], de: [...] } }). Matching is literal: case, accents and ® are ignored, and the term may sit inside a longer word, but nothing is translated. V2 answers are not translated, so a term written in one language is not found in answers of another unless its variants for that language are given, and inflected forms (plurals, German cases such as \"atopischen Dermatitis\") count only when listed as variants. Empty when the report tracks no term."},"sentiment":{"description":"Answers collected of both scopes, counted by sentiment label; unscored = answers collected without sentiment (brand not mentioned, or not scored). Brand questions skew positive by construction: filter scope=agnostic for the brand-free sentiment that /v1 shows as sentiment.market.","allOf":[{"$ref":"#/components/schemas/SentimentCountsV2Dto"}]},"reliability":{"description":"value = mean reliability (0–1) of the answers collected of both scopes that carry one; n = how many carry one. value is null when n is 0. Filter scope=agnostic for the brand-free basis of /v1.","allOf":[{"$ref":"#/components/schemas/ReliabilityV2Dto"}]},"citations":{"$ref":"#/components/schemas/CitationMetricsV2Dto"}},"required":["answers","failed","notTriggered","engineAppearance","brandPresence","brandVisibility","shareOfVoice","appearance","termMentions","sentiment","reliability","citations"]},"MetricsSliceFilterV2Dto":{"type":"object","properties":{"market":{"type":"string","example":"de","description":"Two-letter country"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]},"llm":{"type":"string"},"scope":{"type":"string","enum":["agnostic","brand"]},"category":{"type":"string","enum":["patient","professional","payer","competitive"]}}},"MetricsV2SliceDto":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/MetricsSliceFilterV2Dto"},"metrics":{"$ref":"#/components/schemas/MetricsV2Dto"}},"required":["filter","metrics"]},"ReportMetricsV2Dto":{"type":"object","properties":{"filter":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Filters applied before computing"},"overall":{"$ref":"#/components/schemas/MetricsV2Dto"},"slices":{"description":"Precomputed slices: one per value present of market, language, llm, scope and category, one per (market, language) and (market, llm) pair present, and one per (market, language, llm) triple present (engine × language in each country, as /v1 metrics-by-market). A slice that is absent has no answer: it is never replaced by the overall figures.","type":"array","items":{"$ref":"#/components/schemas/MetricsV2SliceDto"}}},"required":["filter","overall","slices"]},"ReportMetricsV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ReportMetricsV2Dto"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]}},"required":["data"]},"ReportPersonaV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Persona id, the value of personaId on its answers and in /v2/personas"},"name":{"type":"string","nullable":true,"description":"Name at the time of the run; null when the report does not record it"},"base":{"type":"string","enum":["patient","professional","payer"],"nullable":true},"answered":{"type":"boolean","description":"true when at least one collected answer of this persona is in the report"},"answers":{"type":"number","description":"Collected answers of this persona (status ok)"},"attributes":{"type":"object","nullable":true,"description":"Merged reports: the attributes frozen at launch. Brand and agnostic reports: null, read them with GET /v2/personas/:id (a change of attributes gives a new id)."}},"required":["id","name","base","answered","answers","attributes"]},"ReportPersonaV2ListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportPersonaV2Dto"}}},"required":["data"]},"V2SourcesSummaryResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AgnosticCitationsSummaryDto"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]}},"required":["data"]},"RecommendationStateV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Recommendation id of /v2/reports/:id/recommendations"},"stableId":{"type":"string","description":"Identity across the runs of the series: standard.stableId. A recommendation without standard gets an id starting with run_, valid on this run only."},"status":{"type":"string","enum":["todo","in_progress","done","dismissed"],"description":"One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1."},"favorite":{"type":"boolean"},"dismissReason":{"type":"string","enum":["not_relevant","already_done","no_resource","not_allowed_compliance"],"nullable":true},"dismissNote":{"type":"string","nullable":true},"visibility":{"type":"string","enum":["visible","hidden","tracking"],"description":"hidden = dismissed and still suppressed; tracking = done, out of the ranking"},"tier":{"type":"string","enum":["high","medium","low"],"nullable":true,"description":"Tier recomputed after removing hidden and done recommendations (at most 3 high per owner, market and language)"},"updatedAt":{"type":"string","nullable":true}},"required":["id","stableId","status","favorite","dismissReason","dismissNote","visibility","tier","updatedAt"]},"RecommendationStateListV2Dto":{"type":"object","properties":{"reportId":{"type":"string"},"scopeId":{"type":"string","description":"Series id (or the report id when it is not part of a series): the scope in which states are kept"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationStateV2Dto"}}},"required":["reportId","scopeId","data"]},"UpdateRecommendationStateV2Dto":{"type":"object","properties":{"status":{"type":"string","enum":["todo","in_progress","done","dismissed"],"description":"done moves the recommendation to impact tracking; dismissed hides it for 3 runs of the series (forever for not_allowed_compliance). One state per recommendation, shared by the V1 routes (/v1/brands/reports/:id/recommendation-states, /v1/agnostic/reports/:id/recommendation-states, /v1/merged/reports/:id/recommendation-statuses) and the V2 routes (/v2/reports/:id/recommendations/states). Status, V1 → V2: todo → todo, in-progress → in_progress, published → done, ignored → dismissed. Dismiss reason, V1 → V2: not_feasible → no_resource, regulatory → not_allowed_compliance, other → not_relevant; the other values are the same. A reason written in V2 reads back unchanged in V1."},"favorite":{"type":"boolean"},"dismissReason":{"type":"string","enum":["not_relevant","already_done","no_resource","not_allowed_compliance"],"nullable":true,"description":"Setting it sets status to dismissed. Required to dismiss on an account where the recommendation standard is enabled, unless the recommendation is already dismissed with a reason."},"dismissNote":{"type":"object","maxLength":1000,"nullable":true}}},"RecommendationStateRecordV2Dto":{"type":"object","properties":{"stableId":{"type":"string","description":"Identity across the runs of the series (standard.stableId): the state is kept under it"},"status":{"type":"string","enum":["todo","in_progress","done","dismissed"]},"favorite":{"type":"boolean"},"dismissReason":{"type":"string","enum":["not_relevant","already_done","no_resource","not_allowed_compliance"],"nullable":true},"dismissNote":{"type":"string","nullable":true},"dismissedAt":{"type":"string","nullable":true,"example":"2026-11-24T09:12:00.000Z","description":"When it was last dismissed; null when it never was"},"doneAt":{"type":"string","nullable":true,"example":"2026-11-24T09:12:00.000Z","description":"When it was marked done: start of the impact tracking; null when it is not done"},"updatedAt":{"type":"string","example":"2026-11-24T09:12:00.000Z"}},"required":["stableId","status","favorite","dismissReason","dismissNote","dismissedAt","doneAt","updatedAt"]},"RecommendationStateUpdateV2Dto":{"type":"object","properties":{"reportId":{"type":"string","description":"Report id of the call (a run)"},"data":{"description":"State recorded for the series","allOf":[{"$ref":"#/components/schemas/RecommendationStateRecordV2Dto"}]}},"required":["reportId","data"]},"ImpactCheckpointV2Dto":{"type":"object","properties":{"weeks":{"type":"number","enum":[4,8],"example":4,"description":"Weeks after the recommendation was marked done"},"runId":{"type":"string","nullable":true,"description":"First finished run of the series at least this many weeks after; null while there is none"},"gapShare":{"type":"number","nullable":true,"example":0.4,"description":"Share of answers still showing the gap in that run, 0 to 1; null without run or when the run no longer has the recommendation"},"change":{"type":"number","nullable":true,"example":0.35,"description":"baselineGapShare minus gapShare, three decimals: above 0 = the gap shrank; null when either is missing"}},"required":["weeks","runId","gapShare","change"]},"ImpactTrackingV2Dto":{"type":"object","properties":{"stableId":{"type":"string","description":"standard.stableId of the recommendation"},"doneAt":{"type":"string","example":"2026-10-01T08:00:00.000Z","description":"When it was marked done"},"targetMetric":{"type":"string","nullable":true,"example":"citation-share","description":"Metric the recommendation targets, as recorded when it was marked done"},"baselineGapShare":{"type":"number","nullable":true,"example":0.75,"description":"Share of answers showing the gap when it was marked done, 0 to 1"},"checkpoints":{"description":"One checkpoint per tracking delay (4 and 8 weeks), in that order","type":"array","items":{"$ref":"#/components/schemas/ImpactCheckpointV2Dto"}}},"required":["stableId","doneAt","targetMetric","baselineGapShare","checkpoints"]},"RecommendationImpactListV2Dto":{"type":"object","properties":{"seriesId":{"type":"string"},"kind":{"type":"string","enum":["brand","agnostic","merged"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ImpactTrackingV2Dto"}}},"required":["seriesId","kind","data"]},"SentimentAnswerCountsV2Dto":{"type":"object","properties":{"positive":{"type":"number","example":5},"neutral":{"type":"number","example":4},"negative":{"type":"number","example":1}},"required":["positive","neutral","negative"]},"CompetitorSynthesisV2Dto":{"type":"object","properties":{"name":{"type":"string","example":"Brand B","description":"A competitor of the report (meta.competitors)"},"shareOfVoice":{"type":"number","example":0.32,"description":"Share of voice in this country and language, 0 to 1"},"sentiment":{"description":"Number of answers mentioning this competitor, by sentiment toward it","allOf":[{"$ref":"#/components/schemas/SentimentAnswerCountsV2Dto"}]},"strengths":{"description":"Points where the competitor leads the brand","type":"array","items":{"type":"string"}},"weaknesses":{"description":"Points where the brand leads","type":"array","items":{"type":"string"}}},"required":["name","shareOfVoice","sentiment","strengths","weaknesses"]},"CompetitiveSynthesisV2Dto":{"type":"object","properties":{"competitors":{"type":"array","items":{"$ref":"#/components/schemas/CompetitorSynthesisV2Dto"}}},"required":["competitors"]},"RecommendationsSynthesisActionV2Dto":{"type":"object","properties":{"rank":{"type":"number","example":1},"action":{"type":"string"},"why":{"type":"string"},"expectedImpact":{"type":"string"},"effort":{"type":"string","enum":["low","medium","high"]},"linkedRecommendationIds":{"description":"Ids of the recommendations of /v2/reports/{id}/recommendations this action groups. Empty when none of them is listed any more: the promotional status of such an action cannot be read","type":"array","items":{"type":"string"}}},"required":["rank","action","why","linkedRecommendationIds"]},"RecommendationsSynthesisV2Dto":{"type":"object","properties":{"headline":{"type":"string"},"topActions":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationsSynthesisActionV2Dto"}},"quickWins":{"type":"array","items":{"type":"string"}},"watchOuts":{"type":"array","items":{"type":"string"}}},"required":["headline","topActions","quickWins","watchOuts"]},"MarketAnalysisV2Dto":{"type":"object","properties":{"market":{"type":"string","example":"fr","description":"Two-letter country, lowercase; eu is the Europe zone of older reports"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"fr"},"unavailable":{"type":"boolean","description":"true = no answer was collected for this country and language, so no analysis exists: both syntheses are empty and must not be read as zero"},"competitive":{"description":"With unavailable false, every competitor of the report, at a share of voice of 0 when no answer mentions it; empty when the report declares no competitor or when unavailable is true","allOf":[{"$ref":"#/components/schemas/CompetitiveSynthesisV2Dto"}]},"recommendationsSynthesis":{"nullable":true,"description":"null when unavailable is true, or when the country and language had answers but the synthesis could not be produced. The promotional status of each action is read on its linked recommendations","allOf":[{"$ref":"#/components/schemas/RecommendationsSynthesisV2Dto"}]}},"required":["market","language","unavailable","competitive","recommendationsSynthesis"]},"MarketAnalysesV2ResponseDto":{"type":"object","properties":{"data":{"description":"Empty when no analysis per country is available for this report or these filters: not available, never nothing to report","type":"array","items":{"$ref":"#/components/schemas/MarketAnalysisV2Dto"}}},"required":["data"]},"EntityStatsV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"e_3kQ9…","description":"Same id for the same product or organisation in every report and family (derived from its type and normalised name)"},"legacyId":{"type":"string","nullable":true,"description":"Id of the entity in the /v1 routes of this report"},"name":{"type":"string","example":"Dupixent"},"type":{"type":"string","enum":["product","organization","condition","other"]},"isBrand":{"type":"boolean"},"isCompetitor":{"type":"boolean"},"moleculeOf":{"type":"string","example":"Jakafi","description":"Merged: for a molecule, the brand it belongs to, as the run stored it"},"variants":{"example":["Jakafi XR"],"description":"Merged: other names of the entity found in the answers and counted with it","type":"array","items":{"type":"string"}},"sentiment":{"type":"string","example":"neutral","description":"Merged: dominant sentiment of the answers that mention the entity, as the run stored it"},"answers":{"type":"number","description":"Answers collected (status ok, without persona) of both scopes in the perimeter that name the entity. Brand questions included: it can exceed brandFreeAnswers by far on a brand report. A brand report measures the brand only: its competitors stay at 0, not measured."},"brandFreeAnswers":{"type":"number","description":"Of answers, the brand-free ones (scope agnostic): the basis of appearance and shareOfVoice. Equals appearance.num when appearance is not null."},"byLlm":{"type":"object","additionalProperties":{"type":"number"},"example":{"OpenAI":4,"Gemini":2},"description":"answers split by model"},"appearance":{"nullable":true,"description":"appearance of /metrics for the same filters: brand-free answers naming the entity (brandFreeAnswers) over brand-free answers. null for an entity /metrics does not follow (not the brand, a competitor or a product).","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"shareOfVoice":{"nullable":true,"description":"shareOfVoice of /metrics for the same filters, over the brand, its competitors and the products. null for an entity /metrics does not follow.","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"weightedShareOfVoice":{"nullable":true,"description":"weightedShareOfVoice of /metrics for the same filters: the share of voice of /v1 agnostic metrics/products, weighted by source authority and detection confidence (num and den are decimal sums of weights). Agnostic reports only, absent on merged and brand reports. null for an entity /v1 does not count as a product.","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]},"appearanceViaMolecule":{"nullable":true,"description":"appearanceViaMolecule of /metrics. Absent when the report did not mark how each mention was found.","allOf":[{"$ref":"#/components/schemas/RateV2Dto"}]}},"required":["id","legacyId","name","type","isBrand","isCompetitor","answers","brandFreeAnswers","byLlm","appearance","shareOfVoice"]},"EntityStatsV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EntityStatsV2Dto"}}},"required":["nextCursor","total","data"]},"CoMentionV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"e_3kQ9…~e_8xT2…","description":"The two entity ids joined by ~, in alphabetical order"},"entityIds":{"minItems":2,"maxItems":2,"description":"Ids of /v2/reports/:id/entities, in alphabetical order","type":"array","items":{"type":"string"}},"answers":{"type":"number","description":"Answers collected (status ok, without persona) in the perimeter that name both entities"},"byLlm":{"type":"object","additionalProperties":{"type":"number"},"example":{"OpenAI":4,"Gemini":2},"description":"answers split by model"}},"required":["id","entityIds","answers","byLlm"]},"CoMentionV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CoMentionV2Dto"}}},"required":["nextCursor","total","data"]},"RecommendationGroupV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Group id, to pass back as cursor"},"by":{"type":"string","enum":["similar","category","owner","review","tier","quadrant","priority","kind","market","language"]},"key":{"type":"string","nullable":true,"description":"Value of the grouping label; null = recommendations without it, and always null for similar"},"count":{"type":"number"},"representativeId":{"type":"string","description":"Id of the first recommendation of the group: the most complete one for similar"},"llms":{"description":"Models that proposed a recommendation of the group (empty for merged reports)","type":"array","items":{"type":"string"}},"minSimilarity":{"type":"number","nullable":true,"description":"similar only: lowest similarity inside the group (1 for a single recommendation)"},"recommendations":{"description":"At most perGroup recommendations of the group (default 20); count gives them all","type":"array","items":{"$ref":"#/components/schemas/RecommendationV2Dto"}},"nextRecommendationCursor":{"type":"string","nullable":true,"description":"More recommendations in this group: pass group=<id of this group>&groupCursor=<this value> (same filters) for the next ones; null when the group is complete"}},"required":["id","by","key","count","representativeId","llms","minSimilarity","recommendations","nextRecommendationCursor"]},"RecommendationGroupV2PageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationGroupV2Dto"}}},"required":["nextCursor","total","data"]},"RecommendationRerunV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new report (a run), to follow with GET /v2/reports/:id"},"kind":{"type":"string","enum":["merged"]},"status":{"type":"string","example":"pending"},"sourceReportId":{"type":"string"},"recommendationId":{"type":"string","description":"id of the recommendation in /v2/reports/:id/recommendations"},"stableId":{"type":"string","nullable":true,"description":"standard.stableId of the recommendation, when it has a standard"}},"required":["id","kind","status","sourceReportId","recommendationId","stableId"]},"AnswerDiffSummaryV2Dto":{"type":"object","properties":{"changed":{"type":"number"},"stable":{"type":"number"},"new":{"type":"number"},"dropped":{"type":"number"},"total":{"type":"number"}},"required":["changed","stable","new","dropped","total"]},"AnswerDiffSideV2Dto":{"type":"object","properties":{"answerId":{"type":"string","description":"Answer id in /v2/reports/:id/answers of this run"},"questionId":{"type":"string","description":"Question id in this run"},"status":{"type":"string","enum":["ok","failed","not_triggered"]},"failureReason":{"type":"string","enum":["not_collected","empty_answer","pending","engine_error"],"nullable":true},"textExcerpt":{"type":"string","description":"First 240 characters of the answer, in its own language"},"sentiment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AnswerSentimentV2Dto"}]},"brandMentioned":{"type":"boolean","nullable":true},"mentions":{"description":"Entity ids mentioned by the answer (entities of /v2/reports/:id)","type":"array","items":{"type":"string"}},"citations":{"description":"Source ids cited by the answer (/v2/reports/:id/sources)","type":"array","items":{"type":"string"}}},"required":["answerId","questionId","status","failureReason","textExcerpt","sentiment","brandMentioned","mentions","citations"]},"AnswerDiffEntryV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Answer id of the compared run (of the earlier run for dropped); pass it as cursor"},"questionId":{"type":"string","description":"Question id of the compared run (of the earlier run for dropped). Stable from one run to the next while the question is not edited"},"questionText":{"$ref":"#/components/schemas/BilingualTextDto"},"market":{"type":"string","example":"de","description":"Two-letter country"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"]},"llm":{"type":"string","example":"OpenAI"},"personaId":{"type":"string","nullable":true},"scope":{"type":"string","enum":["agnostic","brand"]},"category":{"type":"string","enum":["patient","professional","payer","competitive"]},"status":{"type":"string","enum":["changed","stable","new","dropped"],"description":"changed = answer text or answer status differs; stable = same; new = only in the compared run; dropped = only in the earlier run"},"match":{"type":"string","enum":["exact","question","text"],"description":"exact = same answer id (same question, country, language, model and persona); question = merged runs only: same question id of the series (the question was edited between runs), country, model and persona; text = same question text, country, language, model and persona but another id (scope changed between runs)"},"before":{"nullable":true,"description":"Earlier run; null for new","allOf":[{"$ref":"#/components/schemas/AnswerDiffSideV2Dto"}]},"after":{"nullable":true,"description":"Compared run; null for dropped","allOf":[{"$ref":"#/components/schemas/AnswerDiffSideV2Dto"}]}},"required":["id","questionId","questionText","market","language","llm","personaId","scope","category","status","match","before","after"]},"AnswerDiffV2ResponseDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass it back as cursor to read the next page; null on the last page"},"total":{"type":"number","description":"Items matching the filters, all pages included"},"period":{"description":"Only when the id is a series: the reports read together","allOf":[{"$ref":"#/components/schemas/V2PeriodDto"}]},"reportId":{"type":"string","description":"Compared run"},"comparedAgainst":{"type":"string","nullable":true,"description":"Earlier run; null when the report has no earlier finished run in its series"},"autoSelected":{"type":"boolean","description":"true when the earlier run was chosen automatically (against omitted)"},"summary":{"description":"Counts over every filter except status, so that pages of one status keep the whole picture","allOf":[{"$ref":"#/components/schemas/AnswerDiffSummaryV2Dto"}]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnswerDiffEntryV2Dto"}}},"required":["nextCursor","total","reportId","comparedAgainst","autoSelected","summary","data"]},"DriftAlertV2Dto":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string","description":"Run whose end raised the alert"},"recurringId":{"type":"string","nullable":true,"description":"Series id (/v2/series/:id)"},"previousReportId":{"type":"string","nullable":true,"description":"Earlier run the figures are compared with"},"type":{"type":"string","enum":["visibility_drop","sov_drop","sentiment_drop","new_competitor","critical_medical_finding"],"description":"critical_medical_finding is no longer raised; older alerts may still carry it"},"severity":{"type":"string","enum":["info","warning","critical"]},"metric":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true,"description":"Competitor concerned (new_competitor); null otherwise"},"before":{"type":"number","nullable":true},"after":{"type":"number","nullable":true},"delta":{"type":"number","nullable":true},"message":{"type":"string"},"isRead":{"type":"boolean"},"readAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","reportId","recurringId","previousReportId","type","severity","metric","subject","before","after","delta","message","isRead","readAt","createdAt"]},"DriftAlertV2ListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DriftAlertV2Dto"}}},"required":["data"]},"DriftAlertsReadV2Dto":{"type":"object","properties":{"updated":{"type":"number","description":"Alerts marked as read by this call"}},"required":["updated"]},"DriftAlertsReadV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DriftAlertsReadV2Dto"}},"required":["data"]},"DriftAlertV2FeedDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DriftAlertV2Dto"}},"unreadCount":{"type":"number","description":"Unread alerts of the account, all pages included"}},"required":["data","unreadCount"]},"DriftAlertV2OneDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DriftAlertV2Dto"}},"required":["data"]},"V2QuestionDto":{"type":"object","properties":{"text":{"type":"string","example":"Quels traitements existent pour la dermatite atopique ?","description":"The question, in the language it will be asked in. Never translated."},"market":{"type":"string","example":"fr","enum":["us","ca","gb","fr","de","es","it","jp"],"description":"The one country this question is asked in (lowercase). Falls back to the account default market when neither market nor markets is set."},"markets":{"example":["fr","de"],"description":"Convenience: the same text asked in each country listed, one question per country.","type":"array","items":{"type":"string"}},"language":{"type":"string","example":"fr","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"description":"Language of the text. When absent it is detected; \"en\" when it cannot be told."},"scope":{"type":"string","example":"agnostic","enum":["agnostic","brand"],"description":"\"agnostic\" = brand-free question, \"brand\" = question about the brand. In an agnostic report, \"brand\" = a question asked and answered but left out of the brand-free AI visibility (product appearance and share of voice); a brand-free question naming a tracked product is read back that way."},"category":{"type":"string","example":"patient","enum":["patient","professional","payer","competitive"]},"competitor":{"type":"string","example":"Rinvoq","description":"Competitor of a competitive question; a {COMPETITOR} placeholder in the text is replaced by it. Without it, a text with {COMPETITOR} is asked once per competitor of the report. Brand reports: every competitive question names its competitor."},"tags":{"example":["efficacy"],"type":"array","items":{"type":"string"}},"specificLlms":{"type":"array","example":["GoogleAIO","GoogleAIMode"],"description":"Models and engines this question is asked to, in place of the report llms. Absent = the report llms.","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"personas":{"example":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"],"description":"Personas (ids from /v2/personas) this question is asked again for, in place of the report personas. [] = none for this question. Refused on a competitive question of a brand report. At most 3 distinct personas per report.","type":"array","items":{"type":"string"}}},"required":["text","scope","category"]},"CreateV2ReportDto":{"type":"object","properties":{"kind":{"type":"string","example":"merged","enum":["merged","agnostic","brand"],"description":"Report family"},"pathology":{"type":"string","example":"Atopic dermatitis","description":"Pathology (agnostic: required, merged: optional). Without it, merged answers are measured from the question text only"},"brand":{"type":"string","example":"Dupixent","description":"Brand (merged: optional, brand: required)"},"brandAliases":{"example":["dupilumab"],"type":"array","items":{"type":"string"}},"llms":{"type":"array","example":["OpenAI","Gemini","GoogleAIO"],"description":"Models and engines every question is asked to, unless the question sets specificLlms. GoogleAIO and GoogleAIMode need the Google AI Overviews option.","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"competitors":{"example":["Rinvoq","Adbry"],"type":"array","items":{"type":"string"}},"trackedProducts":{"example":["Dupixent"],"type":"array","items":{"type":"string"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"ownedDomains":{"type":"array","maxItems":200,"items":{"oneOf":[{"type":"string","example":"pro.campus.sanofi/de"},{"type":"object","required":["url","group"],"properties":{"url":{"type":"string","example":"dupixent.com"},"group":{"type":"string","enum":["branded","unbranded"]}}}]},"example":["sanofi.com",{"url":"pro.campus.sanofi/de","group":"unbranded"},{"url":"dupixent.com","group":"branded"}],"description":"Domains or URL prefixes the client owns, at most 200. A string (example.com, example.com/fr or https://www.example.com/fr/) or { url, group } with group branded or unbranded. A domain covers its subdomains; a prefix covers its path and below, by whole segment (/de does not cover /deutsch). Stored normalized: no scheme, no www, lowercase, no trailing slash. When a source matches several entries, the longest one gives its group."},"trackedTerms":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","required":["term"],"properties":{"term":{"type":"string"},"variants":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}]},"example":["mechanism of action",{"term":"atopic dermatitis","variants":{"fr":["dermatite atopique"],"de":["atopische Dermatitis","atopischen Dermatitis"]}}],"description":"Terms whose mention rate the report measures (metrics termMentions). Each entry is a term, or { term, variants } where variants lists, per answer language, the other ways to write the term in that language, e.g. { \"term\": \"atopic dermatitis\", \"variants\": { \"fr\": [\"dermatite atopique\"], \"de\": [\"atopische Dermatitis\", \"atopischen Dermatitis\"] } }. An answer cites the term when it contains the term or a variant of its own language; the rate is reported under the term. Nothing is translated: answers are kept in their language, so give the variants for every language asked. A term repeated (ignoring case, accents, ®, ™ and ©) is measured once, with the variants of all its entries; terms and variants shorter than 2 characters are ignored. Matching ignores case, accents and ® and finds the term inside longer words, but inflected forms (plurals, German cases) count only when listed. Up to 50 terms and 20 variants per language, 200 characters each."},"indications":{"example":["Atopic dermatitis"],"description":"Indications. Brand: scope of the brand. Merged series: kept on the series settings and given back by GET /v2/series/{id}; they change neither the questions nor the figures. Not used by agnostic reports.","type":"array","items":{"type":"string"}},"personas":{"example":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"],"description":"Personas (ids from /v2/personas) every question is asked again for, unless the question sets its own personas. Each persona answer comes on top of the answer without persona, which the figures keep using. Google AI Overviews and AI Mode are not asked for personas, nor the competitive questions of a brand report. Brand and agnostic reports add the persona answers a few minutes after the report finishes. At most 3 distinct personas per report.","type":"array","items":{"type":"string"}},"questions":{"description":"One market per question. Ids do not depend on the order.","type":"array","items":{"$ref":"#/components/schemas/V2QuestionDto"}},"metadata":{"type":"object","example":{"source":"sanofi-api"}}},"required":["kind","llms","questions"]},"V2CreatedQuestionDto":{"type":"object","properties":{"id":{"type":"string","example":"q_3fZk9xQ2mN0pLr7s","description":"Stable id of the question (same text, country, language and competitor = same id)"},"market":{"type":"string","example":"fr"},"language":{"type":"string","example":"fr","description":"Language the question is asked in"},"languageSource":{"type":"string","example":"detected","enum":["client","detected","fallback"],"description":"\"fallback\" = the language could not be told and \"en\" was used: send `language` to fix it"},"competitor":{"type":"string","example":null,"nullable":true},"specificLlms":{"example":null,"nullable":true,"description":"Models and engines set on this question; null = the report llms","type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","GoogleAIO"],"description":"Models and engines this question will be asked to","type":"array","items":{"type":"string"}},"personas":{"example":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"],"description":"Personas this question is asked again for; absent = none","type":"array","items":{"type":"string"}}},"required":["id","market","language","languageSource","competitor","specificLlms"]},"V2ReportCreatedDto":{"type":"object","properties":{"id":{"type":"string","example":"7f9c2a4e-1b2c-4d3e-9f00-1a2b3c4d5e6f"},"kind":{"type":"string","example":"merged","enum":["merged","agnostic","brand"]},"status":{"type":"string","example":"pending"},"questions":{"type":"number","example":3,"description":"Questions created, one per country"},"markets":{"example":["fr","us"],"type":"array","items":{"type":"string"}},"createdQuestions":{"type":"array","items":{"$ref":"#/components/schemas/V2CreatedQuestionDto"}},"warnings":{"example":["questions[0]: the brand-free question names \"Rinvoq\" (competitor); it is kept, and its answers may favour what it names in the market figures"],"description":"Brand-free questions (scope \"agnostic\") that name the brand, a brand alias, a competitor or a tracked product: all accepted and asked, listed here with the reason. Naming the brand or a brand alias (merged) makes it a brand question (scope \"brand\"); naming a tracked product (agnostic) leaves it out of the brand-free AI visibility; in both cases it does not count in the brand-free figures. In an agnostic report, a question sent with scope \"brand\" is listed too: asked, but left out of the brand-free AI visibility. An agnostic report that does not track exactly one product is listed too: as in /v1, it gets no recommendation. Nothing here is refused.","type":"array","items":{"type":"string"}}},"required":["id","kind","status","questions","markets","createdQuestions"]},"CreateV2SeriesDto":{"type":"object","properties":{"kind":{"type":"string","example":"merged","enum":["merged","agnostic","brand"],"description":"Report family"},"pathology":{"type":"string","example":"Atopic dermatitis","description":"Pathology (agnostic: required, merged: optional). Without it, merged answers are measured from the question text only"},"brand":{"type":"string","example":"Dupixent","description":"Brand (merged: optional, brand: required)"},"brandAliases":{"example":["dupilumab"],"type":"array","items":{"type":"string"}},"llms":{"type":"array","example":["OpenAI","Gemini","GoogleAIO"],"description":"Models and engines every question is asked to, unless the question sets specificLlms. GoogleAIO and GoogleAIMode need the Google AI Overviews option.","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"competitors":{"example":["Rinvoq","Adbry"],"type":"array","items":{"type":"string"}},"trackedProducts":{"example":["Dupixent"],"type":"array","items":{"type":"string"}},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"ownedDomains":{"type":"array","maxItems":200,"items":{"oneOf":[{"type":"string","example":"pro.campus.sanofi/de"},{"type":"object","required":["url","group"],"properties":{"url":{"type":"string","example":"dupixent.com"},"group":{"type":"string","enum":["branded","unbranded"]}}}]},"example":["sanofi.com",{"url":"pro.campus.sanofi/de","group":"unbranded"},{"url":"dupixent.com","group":"branded"}],"description":"Domains or URL prefixes the client owns, at most 200. A string (example.com, example.com/fr or https://www.example.com/fr/) or { url, group } with group branded or unbranded. A domain covers its subdomains; a prefix covers its path and below, by whole segment (/de does not cover /deutsch). Stored normalized: no scheme, no www, lowercase, no trailing slash. When a source matches several entries, the longest one gives its group."},"trackedTerms":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","required":["term"],"properties":{"term":{"type":"string"},"variants":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}]},"example":["mechanism of action",{"term":"atopic dermatitis","variants":{"fr":["dermatite atopique"],"de":["atopische Dermatitis","atopischen Dermatitis"]}}],"description":"Terms whose mention rate the report measures (metrics termMentions). Each entry is a term, or { term, variants } where variants lists, per answer language, the other ways to write the term in that language, e.g. { \"term\": \"atopic dermatitis\", \"variants\": { \"fr\": [\"dermatite atopique\"], \"de\": [\"atopische Dermatitis\", \"atopischen Dermatitis\"] } }. An answer cites the term when it contains the term or a variant of its own language; the rate is reported under the term. Nothing is translated: answers are kept in their language, so give the variants for every language asked. A term repeated (ignoring case, accents, ®, ™ and ©) is measured once, with the variants of all its entries; terms and variants shorter than 2 characters are ignored. Matching ignores case, accents and ® and finds the term inside longer words, but inflected forms (plurals, German cases) count only when listed. Up to 50 terms and 20 variants per language, 200 characters each."},"indications":{"example":["Atopic dermatitis"],"description":"Indications. Brand: scope of the brand. Merged series: kept on the series settings and given back by GET /v2/series/{id}; they change neither the questions nor the figures. Not used by agnostic reports.","type":"array","items":{"type":"string"}},"personas":{"example":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"],"description":"Personas (ids from /v2/personas) every question is asked again for, unless the question sets its own personas. Each persona answer comes on top of the answer without persona, which the figures keep using. Google AI Overviews and AI Mode are not asked for personas, nor the competitive questions of a brand report. Brand and agnostic reports add the persona answers a few minutes after the report finishes. At most 3 distinct personas per report.","type":"array","items":{"type":"string"}},"questions":{"description":"One market per question. Ids do not depend on the order.","type":"array","items":{"$ref":"#/components/schemas/V2QuestionDto"}},"metadata":{"type":"object","example":{"source":"sanofi-api"}},"recurrenceType":{"type":"string","example":"MONTHLY","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"isActive":{"type":"boolean","example":true,"default":true,"description":"Run the series on its schedule"},"runNow":{"type":"boolean","example":true,"default":false,"description":"Also create the first report now"}},"required":["kind","llms","questions","recurrenceType"]},"V2SeriesDto":{"type":"object","properties":{"id":{"type":"string","example":"1c2d3e4f-5a6b-7c8d-9e0f-a1b2c3d4e5f6"},"kind":{"type":"string","example":"agnostic","enum":["merged","agnostic","brand"]},"recurrenceType":{"type":"string","example":"MONTHLY","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"isActive":{"type":"boolean","example":true},"nextRunAt":{"type":"string","example":"2026-11-26T00:00:00.000Z","nullable":true},"questions":{"type":"number","example":3},"markets":{"example":["fr","us"],"type":"array","items":{"type":"string"}},"firstReportId":{"type":"string","example":"7f9c2a4e-1b2c-4d3e-9f00-1a2b3c4d5e6f","nullable":true,"description":"Report created now (runNow)"},"firstRunError":{"type":"string","example":null,"nullable":true,"description":"Why the first report could not start (runNow); the series is created and runs on its schedule"},"createdQuestions":{"type":"array","items":{"$ref":"#/components/schemas/V2CreatedQuestionDto"}},"warnings":{"example":["questions[0]: the brand-free question names \"Rinvoq\" (competitor); it is kept, and its answers may favour what it names in the market figures"],"description":"Brand-free questions (scope \"agnostic\") that name the brand, a brand alias, a competitor or a tracked product: all accepted and asked, listed here with the reason. Naming the brand or a brand alias (merged) makes it a brand question (scope \"brand\"); naming a tracked product (agnostic) leaves it out of the brand-free AI visibility; in both cases it does not count in the brand-free figures. In an agnostic report, a question sent with scope \"brand\" is listed too: asked, but left out of the brand-free AI visibility. An agnostic report that does not track exactly one product is listed too: as in /v1, it gets no recommendation. Nothing here is refused.","type":"array","items":{"type":"string"}}},"required":["id","kind","recurrenceType","isActive","nextRunAt","questions","markets"]},"V2ProductPromotionDto":{"type":"object","properties":{"product":{"type":"string","example":"Dupixent","description":"A tracked product of the series"},"promotionBlockedMarkets":{"type":"array","example":["fr"],"description":"Countries where this product may not be promoted","items":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"]}}},"required":["product","promotionBlockedMarkets"]},"UpdateV2SeriesDto":{"type":"object","properties":{"questions":{"description":"Replaces every question of the series. A question keeps no persona unless it sets personas or personas is sent with it.","type":"array","items":{"$ref":"#/components/schemas/V2QuestionDto"}},"personas":{"example":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"],"description":"With questions: the personas of every question sent that sets none. Without questions: replaces the personas of every current question ([] = none); the competitive questions of a brand series keep none. At most 3 distinct personas.","type":"array","items":{"type":"string"}},"llms":{"type":"array","example":["OpenAI","Gemini","GoogleAIO"],"description":"Models and engines every question is asked to, unless the question sets specificLlms","items":{"type":"string","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"]}},"recurrenceType":{"type":"string","example":"WEEKLY","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"isActive":{"type":"boolean","example":false},"productModes":{"type":"object","example":{"Rezurock":"grouped","Jakafi":"separate"},"additionalProperties":{"type":"string","enum":["separate","grouped"]},"description":"Merged and agnostic series. Per product, how its brand and its molecule are counted: \"separate\" (default) counts the brand names on one line and the molecule on a line of its own, with the development codes on the molecule line; \"grouped\" counts the brand, the molecule and the codes on one line, even for a generic molecule, whose generics from other companies then count too. Keys are product names: a tracked product, the brand or a competitor. The key \"*\" sets the mode of every product not named in the map (for example {\"*\": \"grouped\"}). A product left out, with no \"*\" key, is \"separate\". Applies to the next reports."},"name":{"type":"string","example":"Dupixent — monthly","maxLength":200,"description":"Name of the series, the one PharmaGeo shows. Merged series: kept as metadata.name, as a rename in PharmaGeo does, at most 80 characters. Agnostic and brand series: kept on the new settings version."},"metadata":{"type":"object","example":{"source":"sanofi-api"},"nullable":true,"description":"Replaces the whole metadata object of the series; null removes it. Merged series: the name of the series (metadata.name) is kept unless the new object or name sets it. At most 8192 bytes once serialized."},"indications":{"example":["Atopic dermatitis"],"description":"Merged and brand series. Replaces every indication of the series. Indications. Brand: scope of the brand. Merged series: kept on the series settings and given back by GET /v2/series/{id}; they change neither the questions nor the figures. Not used by agnostic reports.","type":"array","items":{"type":"string"}},"trackedTerms":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","required":["term"],"properties":{"term":{"type":"string"},"variants":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}]},"example":["mechanism of action",{"term":"atopic dermatitis","variants":{"fr":["dermatite atopique"],"de":["atopische Dermatitis","atopischen Dermatitis"]}}],"description":"Replaces every tracked term of the series, with their variants. Terms whose mention rate the report measures (metrics termMentions). Each entry is a term, or { term, variants } where variants lists, per answer language, the other ways to write the term in that language, e.g. { \"term\": \"atopic dermatitis\", \"variants\": { \"fr\": [\"dermatite atopique\"], \"de\": [\"atopische Dermatitis\", \"atopischen Dermatitis\"] } }. An answer cites the term when it contains the term or a variant of its own language; the rate is reported under the term. Nothing is translated: answers are kept in their language, so give the variants for every language asked. A term repeated (ignoring case, accents, ®, ™ and ©) is measured once, with the variants of all its entries; terms and variants shorter than 2 characters are ignored. Matching ignores case, accents and ® and finds the term inside longer words, but inflected forms (plurals, German cases) count only when listed. Up to 50 terms and 20 variants per language, 200 characters each."},"brand":{"type":"string","example":"Dupixent","nullable":true,"description":"Merged series: the brand measured; null makes the series a market-only analysis, refused while a question has scope \"brand\". A new brand is refused while stored questions have scope \"brand\", unless the questions written for it are sent in the same request. Drift alerts and the reuse of recommendations do not compare runs of different brands. Brand series: refused, the brand is what the series measures and cannot change, as in /v1: create a new series. Agnostic series: no brand."},"brandAliases":{"example":["dupilumab"],"description":"Merged series. Replaces every alias of the brand. A new brand sent without brandAliases starts with no alias: the aliases of the former brand are dropped.","type":"array","items":{"type":"string"}},"competitors":{"example":["Rinvoq","Adbry"],"description":"Merged series. Replaces every competitor; the brand of the series is left out of the list, also when the brand changes. Questions already stored keep their competitor; a {COMPETITOR} question sent in the same request is asked once per competitor of the new list. Brand series: refused, their competitors are those named by the competitive questions. Agnostic series: no competitors.","type":"array","items":{"type":"string"}},"ownedDomains":{"type":"array","maxItems":200,"items":{"oneOf":[{"type":"string","example":"pro.campus.sanofi/de"},{"type":"object","required":["url","group"],"properties":{"url":{"type":"string","example":"dupixent.com"},"group":{"type":"string","enum":["branded","unbranded"]}}}]},"example":["sanofi.com",{"url":"pro.campus.sanofi/de","group":"unbranded"},{"url":"dupixent.com","group":"branded"}],"description":"Every family. Replaces every owned entry and its group. Domains or URL prefixes the client owns, at most 200. A string (example.com, example.com/fr or https://www.example.com/fr/) or { url, group } with group branded or unbranded. A domain covers its subdomains; a prefix covers its path and below, by whole segment (/de does not cover /deutsch). Stored normalized: no scheme, no www, lowercase, no trailing slash. When a source matches several entries, the longest one gives its group."},"promotionBlockedMarkets":{"type":"array","example":["fr"],"description":"Merged and brand series. Replaces the list; [] clears it. Countries (lowercase codes) where the product may not be promoted: not authorised or not launched. The recommendations of those countries stay non-promotional; applied when the recommendation standard is on. Taken by the next runs of the series. Merged series: kept as metadata.promotionBlockedMarkets, as /v1 does; a metadata object sent alone keeps it. Agnostic series: use trackedProductPromotion.","items":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"]}},"trackedProductPromotion":{"description":"Agnostic series. Countries where each tracked product may not be promoted; replaces every rule, [] clears them. Countries (lowercase codes) where the product may not be promoted: not authorised or not launched. The recommendations of those countries stay non-promotional; applied when the recommendation standard is on. Taken by the next runs of the series.","type":"array","items":{"$ref":"#/components/schemas/V2ProductPromotionDto"}},"driftEmailOptIn":{"type":"boolean","example":true,"description":"Merged series. E-mail the account when a run of the series drifts critically from the previous one. Drift alerts exist for merged series only."}}},"V2SeriesRunDto":{"type":"object","properties":{"reportId":{"type":"string","example":"7f9c2a4e-1b2c-4d3e-9f00-1a2b3c4d5e6f","description":"Report created by this run; read it with GET /v2/reports/:id"},"kind":{"type":"string","example":"merged","enum":["merged","agnostic","brand"]},"status":{"type":"string","example":"pending","enum":["pending","running"],"description":"The run starts at once and continues in the background"}},"required":["reportId","kind","status"]},"SeriesSummaryV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"b2a1c0de-0000-4000-8000-000000000000"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"format":{"type":"string","enum":["v2","v1"],"description":"v2 = its questions were set through /v2 (one language and one country each); v1 = a /v1 series, still read through /v2"},"pathology":{"type":"string","nullable":true,"description":"Pathology (merged and agnostic series)"},"brand":{"type":"string","nullable":true,"description":"Brand (merged and brand series)"},"recurrenceType":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"isActive":{"type":"boolean","description":"The series runs on its schedule"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","format","pathology","brand","recurrenceType","isActive","nextRunAt","lastRunAt","createdAt"]},"V2SeriesListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SeriesSummaryV2Dto"}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["data","total","page","limit"]},"SeriesMarketV2Dto":{"type":"object","properties":{"market":{"type":"string","example":"fr"},"languages":{"example":["fr"],"type":"array","items":{"type":"string"}}},"required":["market","languages"]},"SeriesSettingsVersionV2Dto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"active":{"type":"boolean","description":"This version is the one the next run uses"},"settings":{"type":"object","additionalProperties":true,"description":"The stored settings of this version, as /v1 gives them"}},"required":["id","createdAt","active","settings"]},"SeriesV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"b2a1c0de-0000-4000-8000-000000000000"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"format":{"type":"string","enum":["v2","v1"],"description":"v2 = its questions were set through /v2 (one language and one country each); v1 = a /v1 series, still read through /v2"},"pathology":{"type":"string","nullable":true,"description":"Pathology (merged and agnostic series)"},"brand":{"type":"string","nullable":true,"description":"Brand (merged and brand series)"},"recurrenceType":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY","BIMONTHLY","QUARTERLY"]},"isActive":{"type":"boolean","description":"The series runs on its schedule"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"activeSettingsId":{"type":"string","nullable":true,"description":"Settings the next run will use"},"llms":{"description":"Models and engines of the series; a question may set its own (specificLlms)","type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true,"nullable":true,"description":"Metadata the client set on the series"},"questions":{"nullable":true,"description":"Questions the next run will ask, with the ids their answers will carry (unchanged from one run to the next while the question is not edited). null for a v1 series or unreadable stored questions.","type":"array","items":{"$ref":"#/components/schemas/QuestionV2Dto"}},"name":{"type":"string","nullable":true,"example":"Dupixent — monthly","description":"Name of the series (settings the next run will use)"},"brandAliases":{"description":"Merged series: other names of the brand. Empty for the other families.","type":"array","items":{"type":"string"}},"indications":{"example":["Atopic dermatitis"],"description":"Merged and brand series: indications. Empty for agnostic series.","type":"array","items":{"type":"string"}},"trackedTerms":{"description":"Tracked terms, with their variants per language; send them back as is in PATCH trackedTerms","type":"array","items":{"$ref":"#/components/schemas/TrackedTermV2Dto"}},"productModes":{"type":"object","additionalProperties":{"type":"string","enum":["separate","grouped"]},"nullable":true,"description":"Merged and agnostic series: separate or grouped counting per tracked product. null when not set or for a brand series."},"questionPersonas":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true,"example":{"q_3fZk9xQ2mN0pLr7s":["3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"]},"description":"Question id → personas the next run asks it again for. Questions without persona are left out. null for a v1 series."},"ownedDomains":{"type":"array","maxItems":200,"items":{"oneOf":[{"type":"string","example":"pro.campus.sanofi/de"},{"type":"object","required":["url","group"],"properties":{"url":{"type":"string","example":"dupixent.com"},"group":{"type":"string","enum":["branded","unbranded"]}}}]},"example":["sanofi.com",{"url":"pro.campus.sanofi/de","group":"unbranded"},{"url":"dupixent.com","group":"branded"}],"description":"Owned domains and URL prefixes, normalized; an entry with a group is { url, group }. Send them back as is in PATCH ownedDomains."},"promotionBlockedMarkets":{"example":["jp"],"description":"Merged and brand series: countries where the product may not be promoted. Merged series: read from metadata.promotionBlockedMarkets. Empty for agnostic series.","type":"array","items":{"type":"string"}},"trackedProductPromotion":{"description":"Agnostic series: countries where each tracked product may not be promoted. Empty for the other families.","type":"array","items":{"$ref":"#/components/schemas/V2ProductPromotionDto"}},"driftEmailOptIn":{"type":"boolean","nullable":true,"example":false,"description":"Merged series: drift alerts e-mailed. null for brand and agnostic series, which have no drift alerts."},"markets":{"nullable":true,"description":"Countries of the series and their languages, as stored on the active settings; null when the series uses the account default","type":"array","items":{"$ref":"#/components/schemas/SeriesMarketV2Dto"}},"trackedProductProfiles":{"type":"array","items":{"type":"object","additionalProperties":true},"nullable":true,"description":"Product sheets of the tracked products (codes, molecules, aliases, brands per country), as stored. Merged and agnostic; null otherwise"},"competitorProfiles":{"type":"array","items":{"type":"object","additionalProperties":true},"nullable":true,"description":"Agnostic: product sheets of the competitors, as stored"},"competitorAliases":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true,"description":"Merged: competitor → other names counted with it"},"linkMolecules":{"type":"boolean","nullable":true,"description":"Merged and agnostic: a molecule mention counts for its brand"},"alertThreshold":{"type":"number","nullable":true,"description":"Merged and brand: drift alert threshold, as stored; null = no alert"},"personaAssignments":{"type":"array","items":{"type":"object","additionalProperties":true},"nullable":true,"description":"Personas each question is asked again for ({ questionText, personaIds }), as stored"},"settingsHistory":{"description":"Versions of the settings, newest first, at most 50: the active one has active true","type":"array","items":{"$ref":"#/components/schemas/SeriesSettingsVersionV2Dto"}}},"required":["id","kind","format","pathology","brand","recurrenceType","isActive","nextRunAt","lastRunAt","createdAt","activeSettingsId","llms","languages","competitors","trackedProducts","metadata","questions","name","brandAliases","indications","trackedTerms","productModes","questionPersonas","ownedDomains","promotionBlockedMarkets","trackedProductPromotion","driftEmailOptIn"]},"SeriesV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SeriesV2Dto"}},"required":["data"]},"SeriesRunV2Dto":{"type":"object","properties":{"id":{"type":"string","description":"Report id, readable through /v2/reports/:id"},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"rawStatus":{"type":"string","example":"done","description":"Status as the family stores it (/v1)"},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","status","rawStatus","createdAt","finishedAt"]},"V2SeriesRunListDto":{"type":"object","properties":{"data":{"description":"Newest first","type":"array","items":{"$ref":"#/components/schemas/SeriesRunV2Dto"}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["data","total","page","limit"]},"SeriesBaseChangeV2Dto":{"type":"object","properties":{"questionsChanged":{"type":"boolean","example":true,"description":"The questions asked differ from the previous run: one added, removed or reworded, or with another country, language, scope, category or competitor"},"brandFreeChanged":{"type":"boolean","example":true,"description":"The brand-free questions (scope \"agnostic\") differ from the previous run: the brand-free AI visibility (appearance, share of voice, brand presence) is measured on another base, so a jump at this run is not a change in the AI engines. In an agnostic series, a question naming a tracked product is left out of this base."}},"required":["questionsChanged","brandFreeChanged"]},"SeriesEvolutionPointV2Dto":{"type":"object","properties":{"reportId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"sentimentEngine":{"type":"string","nullable":true,"example":"brand-scoring-v1","description":"Engine that scored the sentiment of this run. Two runs scored by different engines do not compare on sentiment. Brand runs: brand-scoring-v1, or brand-scoring-target-v1 when scored with BRAND_SCORING_TARGET_ENABLED; null when the run does not record it (agnostic, brand and merged runs made before the engine was recorded): null means unknown, not another engine, so do not cut a series at a null boundary."},"baseChange":{"nullable":true,"description":"Set on the run whose questions differ from the previous finished or partial run of the series (even outside the period or page read): the figures from this run on are measured on other questions. Only the questions are compared: a change of models, competitors, brand, aliases, tracked products, personas, owned domains or tracked terms is not shown here. null when the questions are the same, for the first run, and when they cannot be compared (a run created through /v1, or the first V2 run after one): null does not prove that a jump comes from the AI engines.","allOf":[{"$ref":"#/components/schemas/SeriesBaseChangeV2Dto"}]},"metrics":{"description":"The overall figures of /v2/reports/:id/metrics for this run, with the same filters","allOf":[{"$ref":"#/components/schemas/MetricsV2Dto"}]}},"required":["reportId","createdAt","status","sentimentEngine","baseChange","metrics"]},"SeriesEvolutionV2Dto":{"type":"object","properties":{"seriesId":{"type":"string"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"filter":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Filters applied to every run"},"totalRuns":{"type":"number","description":"Finished runs of the series between from and to, whatever the cursor"},"truncated":{"type":"boolean","description":"true when older finished runs are not in points: beyond limit, or not loaded yet in this call. Follow nextCursor to read them."},"nextCursor":{"type":"string","nullable":true,"description":"When truncated: pass it as cursor to read the older runs; null when every finished run of the range is in points"},"skippedRunIds":{"description":"Finished runs whose report could not be read (archived since): no point for them","type":"array","items":{"type":"string"}},"points":{"description":"One point per finished run (done or partial), oldest first","type":"array","items":{"$ref":"#/components/schemas/SeriesEvolutionPointV2Dto"}}},"required":["seriesId","kind","filter","totalRuns","truncated","nextCursor","skippedRunIds","points"]},"SeriesEvolutionV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SeriesEvolutionV2Dto"}},"required":["data"]},"V2ArchivedReportDto":{"type":"object","properties":{"id":{"type":"string","example":"b2a1c0de-0000-4000-8000-000000000000"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"archived":{"type":"number","enum":[true],"description":"Always true: the resource is archived (kept, no longer listed nor readable)"},"archivedAt":{"type":"string","format":"date-time"}},"required":["id","kind","archived","archivedAt"]},"V2ArchivedSeriesDto":{"type":"object","properties":{"id":{"type":"string","example":"b2a1c0de-0000-4000-8000-000000000000"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"archived":{"type":"number","enum":[true],"description":"Always true: the resource is archived (kept, no longer listed nor readable)"},"archivedAt":{"type":"string","format":"date-time"},"archivedRuns":{"type":"number","description":"Runs of the series archived with it"}},"required":["id","kind","archived","archivedAt","archivedRuns"]},"PersonaSourceAnchorV2Dto":{"type":"object","properties":{"title":{"type":"string","example":"ESC 2023 guidelines"},"url":{"type":"string","example":"https://www.escardio.org/Guidelines"}},"required":["title","url"]},"PersonaV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"},"name":{"type":"string","example":"Oncologue KOL early-adopter"},"base":{"type":"string","enum":["patient","professional","payer"]},"status":{"type":"string","enum":["draft","validated","archived"]},"library":{"type":"boolean","example":false,"description":"true = archetype of the Aikka library: readable by every account, never editable (duplicate it to customise it)"},"libraryId":{"type":"string","example":null,"nullable":true,"description":"Stable id of the library archetype"},"therapeuticAreas":{"example":["oncology"],"description":"Therapeutic areas of a library archetype","type":"array","items":{"type":"string"}},"prevalencePct":{"type":"number","example":null,"nullable":true,"description":"Estimated share of the population within its therapeutic area and role (library archetypes)"},"sourceAnchors":{"type":"array","items":{"$ref":"#/components/schemas/PersonaSourceAnchorV2Dto"}},"indication":{"type":"string","example":"breast cancer","nullable":true},"market":{"type":"string","example":"jp","nullable":true},"languageHint":{"type":"string","example":"en","nullable":true},"version":{"type":"number","example":1,"description":"Personas sharing a name are versions of one another: changing the attributes creates the next version"},"parentId":{"type":"string","example":null,"nullable":true,"description":"First version of this persona, when this one is a later version"},"attributes":{"type":"object","description":"Behavioural attributes (patient or professional schema), frozen into each report that uses the persona"},"createdAt":{"type":"string","example":"2026-11-24T10:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-11-24T10:00:00.000Z"},"archivedAt":{"type":"string","example":null,"nullable":true}},"required":["id","name","base","status","library","libraryId","therapeuticAreas","prevalencePct","sourceAnchors","indication","market","languageHint","version","parentId","attributes","createdAt","updatedAt","archivedAt"]},"PersonaV2ListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonaV2Dto"}},"nextCursor":{"type":"string","example":null,"nullable":true,"description":"Pass it as cursor to read the next page; null on the last page"}},"required":["data"]},"SuggestedPersonaV2Dto":{"type":"object","properties":{"id":{"type":"string","example":"3b1f8c2e-0d4a-4e9b-9c1d-2f6a7b8c9d0e"},"name":{"type":"string","example":"Oncologue KOL early-adopter"},"base":{"type":"string","enum":["patient","professional","payer"]},"status":{"type":"string","enum":["draft","validated","archived"]},"library":{"type":"boolean","example":false,"description":"true = archetype of the Aikka library: readable by every account, never editable (duplicate it to customise it)"},"libraryId":{"type":"string","example":null,"nullable":true,"description":"Stable id of the library archetype"},"therapeuticAreas":{"example":["oncology"],"description":"Therapeutic areas of a library archetype","type":"array","items":{"type":"string"}},"prevalencePct":{"type":"number","example":null,"nullable":true,"description":"Estimated share of the population within its therapeutic area and role (library archetypes)"},"sourceAnchors":{"type":"array","items":{"$ref":"#/components/schemas/PersonaSourceAnchorV2Dto"}},"indication":{"type":"string","example":"breast cancer","nullable":true},"market":{"type":"string","example":"jp","nullable":true},"languageHint":{"type":"string","example":"en","nullable":true},"version":{"type":"number","example":1,"description":"Personas sharing a name are versions of one another: changing the attributes creates the next version"},"parentId":{"type":"string","example":null,"nullable":true,"description":"First version of this persona, when this one is a later version"},"attributes":{"type":"object","description":"Behavioural attributes (patient or professional schema), frozen into each report that uses the persona"},"createdAt":{"type":"string","example":"2026-11-24T10:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-11-24T10:00:00.000Z"},"archivedAt":{"type":"string","example":null,"nullable":true},"matchedTherapeuticAreas":{"example":["oncology"],"description":"Therapeutic areas the pathology matched","type":"array","items":{"type":"string"}}},"required":["id","name","base","status","library","libraryId","therapeuticAreas","prevalencePct","sourceAnchors","indication","market","languageHint","version","parentId","attributes","createdAt","updatedAt","archivedAt","matchedTherapeuticAreas"]},"SuggestedPersonaV2ListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SuggestedPersonaV2Dto"}}},"required":["data"]},"PersonaV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonaV2Dto"}},"required":["data"]},"PersonaV2VersionsDto":{"type":"object","properties":{"data":{"description":"Newest version first","type":"array","items":{"$ref":"#/components/schemas/PersonaV2Dto"}}},"required":["data"]},"CreateV2PersonaDto":{"type":"object","properties":{"base":{"type":"string","enum":["patient","professional","payer"],"description":"Audience category the persona refines"},"name":{"type":"string","example":"Oncologue KOL early-adopter"},"indication":{"type":"string","example":"breast cancer"},"market":{"type":"string","example":"JP"},"languageHint":{"type":"string","example":"en"},"attributes":{"type":"object","description":"Behavioral attributes — HCPPersonaAttributes | PatientPersonaAttributes, validated against the Zod schema server-side. Its `base` must equal the persona base."}},"required":["base","name","attributes"]},"UpdateV2PersonaDto":{"type":"object","properties":{"name":{"type":"string","example":"Oncologue KOL early-adopter"},"indication":{"type":"string"},"market":{"type":"string"},"languageHint":{"type":"string"},"attributes":{"type":"object","description":"Updated behavioral attributes. Changing these creates a new persona version."}}},"V2CancelledReportDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"status":{"type":"string","enum":["cancelled"]},"previousStatus":{"type":"string","description":"Raw status before the cancellation: pending or running"},"cancelledAt":{"type":"string","description":"ISO date"},"credits":{"type":"string","enum":["refunded","prorated"],"nullable":true,"description":"Merged reports: refunded = cancelled before it started, all its credits are given back; prorated = cancelled while running, the run is billed at the cost it recorded when it stopped and the rest of the reserve is given back. A run that died before recording its cost is reconciled later by the stuck-run cleanup, which then gives back almost all the reserve. null for brand and agnostic reports."}},"required":["id","kind","status","previousStatus","cancelledAt","credits"]},"V2CancelledReportResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/V2CancelledReportDto"}},"required":["data"]},"OwnedDomainAuditDomainV2Dto":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["ok","partial","error"]},"pagesCrawled":{"type":"number"},"summary":{"type":"string","description":"What the crawled pages say, written by the model that audited them"},"strengths":{"type":"array","items":{"type":"string"}},"gaps":{"type":"array","items":{"type":"string"}},"error":{"type":"string","nullable":true}},"required":["domain","status","pagesCrawled","summary","strengths","gaps","error"]},"OwnedDomainAuditV2Dto":{"type":"object","properties":{"auditedAt":{"type":"string","nullable":true,"description":"ISO date of the crawl"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/OwnedDomainAuditDomainV2Dto"}}},"required":["auditedAt","domains"]},"OwnedDomainAuditV2ResponseDto":{"type":"object","properties":{"data":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/OwnedDomainAuditV2Dto"}]}},"required":["data"]},"RunCreditsV2Dto":{"type":"object","properties":{"charged":{"type":"number","description":"Prepaid credits taken from the balance for this run: the reserve taken at launch, adjusted to the real cost once reconciled. 0 before the reserve is taken and after a refund: a run that ends in error, at any step, or is cancelled before it started is refunded and reads 0 here with a non-zero costUsd. A run cancelled while running keeps its reserve until it is reconciled; a partial run is not refunded. Usage beyond the prepaid balance, on plans that allow it, is billed separately on the invoice and is not counted here."},"reconciled":{"type":"boolean","description":"true once the reserve was adjusted to the real cost of the run"}},"required":["charged","reconciled"]},"RunCostV2Dto":{"type":"object","properties":{"reportId":{"type":"string"},"kind":{"type":"string","enum":["merged","agnostic","brand"]},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"],"description":"Status of the run, as in GET /v2/reports/:id"},"final":{"type":"boolean","description":"true once the run is finished (done, partial, error or cancelled). While false, costUsd is partial and keeps growing; once true it can still change slightly (see costUsd)"},"costUsd":{"type":"number","description":"Real cost of the run in US dollars, as /v1 gives it in cost.realCostUsd: models, web search and Google AI Overviews, plus the Act Mode calls made on this report. It is the full cost of the run, tokens sent through the account's own model keys included. Credits are reconciled on the models and web search of the generation only, so costUsd does not convert into credits. It grows while the report runs and can still change once final (Google AI Overviews written after the run, post-run corrections, Act Mode). If the Act Mode registry cannot be read, the cost is served without it, as in /v1. No detail per model or provider is given."},"credits":{"nullable":true,"description":"Merged reports only, billed in credits; null for brand and agnostic reports, counted in the monthly report quota","allOf":[{"$ref":"#/components/schemas/RunCreditsV2Dto"}]}},"required":["reportId","kind","status","final","costUsd","credits"]},"RunCostV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RunCostV2Dto"}},"required":["data"]},"RecommendationFollowUpV2Dto":{"type":"object","properties":{"reportId":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","partial","error","cancelled"]},"createdAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true}},"required":["reportId","status","createdAt","finishedAt"]},"RateDeltaV2Dto":{"type":"object","properties":{"before":{"$ref":"#/components/schemas/RateV2Dto"},"after":{"$ref":"#/components/schemas/RateV2Dto"},"delta":{"type":"number","nullable":true,"description":"after.value − before.value, 4 decimals; null when either value is null"}},"required":["before","after","delta"]},"ValueDeltaV2Dto":{"type":"object","properties":{"before":{"type":"number","nullable":true},"after":{"type":"number","nullable":true},"delta":{"type":"number","nullable":true}},"required":["before","after","delta"]},"CountDeltaV2Dto":{"type":"object","properties":{"before":{"type":"number"},"after":{"type":"number"},"delta":{"type":"number"}},"required":["before","after","delta"]},"RecommendationImpactDeltasV2Dto":{"type":"object","properties":{"brandPresence":{"description":"brandPresence of /metrics","allOf":[{"$ref":"#/components/schemas/RateDeltaV2Dto"}]},"brandVisibility":{"description":"brandVisibility of /metrics","allOf":[{"$ref":"#/components/schemas/RateDeltaV2Dto"}]},"brandShareOfVoice":{"description":"shareOfVoice of the brand entity of each report","allOf":[{"$ref":"#/components/schemas/RateDeltaV2Dto"}]},"sentimentNet":{"nullable":true,"description":"(positive − negative) / (positive + neutral + negative), in [−1, 1]. null when the two reports were scored by different sentiment engines, as in /v1.","allOf":[{"$ref":"#/components/schemas/ValueDeltaV2Dto"}]},"ownedCitationShare":{"description":"citations.owned of /metrics","allOf":[{"$ref":"#/components/schemas/RateDeltaV2Dto"}]},"citations":{"description":"citations.total of /metrics","allOf":[{"$ref":"#/components/schemas/CountDeltaV2Dto"}]},"answers":{"description":"answers of /metrics: a gap here means the two runs did not collect the same answers","allOf":[{"$ref":"#/components/schemas/CountDeltaV2Dto"}]}},"required":["brandPresence","brandVisibility","brandShareOfVoice","sentimentNet","ownedCitationShare","citations","answers"]},"RecommendationImpactV2Dto":{"type":"object","properties":{"sourceReportId":{"type":"string"},"recommendationId":{"type":"string"},"stableId":{"type":"string","nullable":true},"filter":{"type":"object","description":"Filters applied to both reports, as in /metrics"},"followUp":{"nullable":true,"description":"Latest re-run of the recommendation, cancelled and failed ones left out; null when there is none","allOf":[{"$ref":"#/components/schemas/RecommendationFollowUpV2Dto"}]},"followUpCount":{"type":"number","description":"Re-runs of this recommendation, archived, cancelled and failed ones left out"},"deltas":{"nullable":true,"description":"null until the latest re-run is done or partial","allOf":[{"$ref":"#/components/schemas/RecommendationImpactDeltasV2Dto"}]}},"required":["sourceReportId","recommendationId","stableId","filter","followUp","followUpCount","deltas"]},"RecommendationImpactV2ResponseDto":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecommendationImpactV2Dto"}},"required":["data"]},"CheckV2QuestionsDto":{"type":"object","properties":{"kind":{"type":"string","enum":["merged","agnostic"],"example":"merged","default":"merged","description":"Family the questions are for (a brand report has no brand-free question). merged: a question naming the brand or a brand alias is marked excludedFromBrandFree. agnostic: send trackedProducts only (no brand, aliases or competitors); a question naming a tracked product is marked excludedFromBrandFree."},"questions":{"example":["Which biologics treat atopic dermatitis?","Is Dupixent safe for children?"],"maxItems":300,"type":"array","items":{"type":"string"}},"brand":{"type":"string","example":"Dupixent"},"brandAliases":{"example":["dupilumab"],"maxItems":50,"type":"array","items":{"type":"string"}},"competitors":{"example":["Rinvoq","Adbry"],"maxItems":50,"type":"array","items":{"type":"string"}},"competitorAliases":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"Rinvoq":["upadacitinib"]},"description":"Other names of each competitor: at most 50 competitors, 200 aliases in all."},"trackedProducts":{"example":["Ebglyss"],"maxItems":50,"description":"Products tracked by an agnostic or merged report.","type":"array","items":{"type":"string"}}},"required":["questions"]},"V2LeakMatchDto":{"type":"object","properties":{"token":{"type":"string","example":"Dupixent","description":"The name found, as sent"},"source":{"type":"string","example":"brand","enum":["brand","brandAlias","competitor","competitorAlias","trackedProduct"],"description":"Which list of the request the name comes from"}},"required":["token","source"]},"V2CheckedQuestionDto":{"type":"object","properties":{"text":{"type":"string","example":"Is Dupixent safe for children?"},"hasLeak":{"type":"boolean","example":true,"description":"true = the question names one of the names sent: it is not brand-free"},"excludedFromBrandFree":{"type":"boolean","example":false,"description":"true = the question is kept and answered, but left out of the brand-free AI visibility: merged, it names the brand or a brand alias (created as a brand question, scope \"brand\"); agnostic, it names a tracked product. Nothing is refused."},"sanitized":{"type":"string","example":"Is [BRAND] safe for children?","description":"The text with every name found replaced by [BRAND], as written (accents, case, hyphens); the text itself when nothing is found"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/V2LeakMatchDto"}}},"required":["text","hasLeak","excludedFromBrandFree","sanitized","matches"]},"V2CheckQuestionsResultDto":{"type":"object","properties":{"allClean":{"type":"boolean","example":false,"description":"true when no question names any of the names sent"},"anyExcluded":{"type":"boolean","example":true,"description":"true when at least one question is left out of the brand-free AI visibility (excludedFromBrandFree)"},"warnings":{"example":["questions[1]: the brand-free question names \"Dupixent\" (brand); it is kept and answered as a brand question (scope \"brand\"), left out of the brand-free AI visibility"],"description":"The warnings POST /v2/reports and /v2/series give for the same questions sent with scope \"agnostic\", plus those for competitorAliases, which creation does not take","type":"array","items":{"type":"string"}},"questions":{"description":"One entry per question, in the order sent","type":"array","items":{"$ref":"#/components/schemas/V2CheckedQuestionDto"}}},"required":["allClean","anyExcluded","warnings","questions"]},"ClassifyV2QuestionsDto":{"type":"object","properties":{"kind":{"type":"string","enum":["merged","agnostic","brand"],"example":"merged","description":"Family the questions are for. agnostic: patient, professional or payer. merged and brand: competitive too. brand and agnostic need the family in the plan."},"lines":{"example":["What are the side effects of Dupixent?","Dupixent vs Rinvoq for atopic dermatitis"],"maxItems":500,"description":"Questions to classify, one per entry (pasted or read from a file). At most 500 lines of 500 characters; blank lines are ignored.","type":"array","items":{"type":"string"}},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"example":"fr","description":"The one country the questions are for, given back on each question. Absent: null on each question, and POST /v2/reports applies the account default market."},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"fr","description":"Language the questions are written in, given back on each question. Absent: null, and POST /v2/reports detects it. Never translated."}},"required":["kind","lines"]},"V2ClassifiedQuestionDto":{"type":"object","properties":{"text":{"type":"string","example":"Dupixent vs Rinvoq for atopic dermatitis","description":"Text of the question, leading numbering removed"},"category":{"type":"string","enum":["patient","professional","payer","competitive"],"example":"competitive"},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"nullable":true,"example":"fr","description":"Country to send with the question: the market sent, or null"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"nullable":true,"example":"fr","description":"Language sent, or null (detected by POST /v2/reports)"}},"required":["text","category","market","language"]},"V2ClassifyQuestionsResultDto":{"type":"object","properties":{"kind":{"type":"string","enum":["merged","agnostic","brand"],"example":"merged"},"questions":{"description":"Grouped by category: patient, professional, payer, then competitive","type":"array","items":{"$ref":"#/components/schemas/V2ClassifiedQuestionDto"}}},"required":["kind","questions"]},"SuggestV2QuestionsDto":{"type":"object","properties":{"pathology":{"type":"string","example":"Atopic dermatitis","description":"Pathology the questions are about"},"brand":{"type":"string","example":"Dupixent","description":"scope \"market\": only used to drop the suggestions that name it. scope \"brand\": required, the questions are about it."},"competitors":{"example":["Rinvoq","Adbry"],"maxItems":50,"description":"scope \"market\": only used to drop the suggestions that name them. scope \"brand\": adds competitive questions written with the {COMPETITOR} placeholder, never with a real name.","type":"array","items":{"type":"string"}},"brandAliases":{"example":["dupilumab"],"maxItems":50,"description":"scope \"market\": the suggestions that name an alias of the brand are dropped too.","type":"array","items":{"type":"string"}},"trackedProducts":{"example":["Ebglyss"],"maxItems":50,"description":"scope \"market\": the suggestions that name a tracked product are dropped too.","type":"array","items":{"type":"string"}},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"en","description":"Language of the questions. Default en."},"count":{"type":"number","example":10,"minimum":1,"maximum":25,"description":"Number of patient, professional and payer questions. Default 10. With scope \"brand\", a brand and competitors, 3 to 5 competitive questions come on top."},"scope":{"type":"string","enum":["market","brand"],"example":"market","description":"\"market\" (default): brand-free questions. \"brand\": questions about the brand."},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"example":"fr","description":"The one country the questions are for, given back on each question. Absent: null on each question, and POST /v2/reports applies the account default market."}},"required":["pathology"]},"V2SuggestedQuestionDto":{"type":"object","properties":{"text":{"type":"string","example":"Which treatments work for moderate atopic dermatitis in adults?"},"scope":{"type":"string","enum":["agnostic","brand"],"example":"agnostic","description":"Scope to send with the question in POST /v2/reports or /v2/series"},"category":{"type":"string","enum":["patient","professional","payer","competitive"],"example":"patient"},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"nullable":true,"example":"fr","description":"Country to send with the question: the market sent, or null"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"nullable":true,"example":"fr","description":"Language the question is written in: the one asked for, never a translation"}},"required":["text","scope","category","market","language"]},"V2SuggestQuestionsResultDto":{"type":"object","properties":{"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"en"},"questions":{"description":"Questions a person would ask an AI assistant when looking for a treatment. Competitive ones keep {COMPETITOR}. scope \"market\": the suggestions that name the brand, an alias, a competitor or a tracked product sent are left out, so there can be fewer than count.","type":"array","items":{"$ref":"#/components/schemas/V2SuggestedQuestionDto"}}},"required":["language","questions"]},"V2ExcludedQuestionsDto":{"type":"object","properties":{"patient":{"maxItems":500,"type":"array","items":{"type":"string"}},"professional":{"maxItems":500,"type":"array","items":{"type":"string"}},"payer":{"maxItems":500,"type":"array","items":{"type":"string"}},"competitive":{"maxItems":500,"description":"merged and brand only","type":"array","items":{"type":"string"}}}},"TrendingV2QuestionsDto":{"type":"object","properties":{"kind":{"type":"string","enum":["merged","agnostic","brand"],"example":"merged","description":"brand and agnostic need the family in the plan"},"pathology":{"type":"string","example":"Atopic dermatitis","description":"merged and agnostic: required. Not taken by brand."},"brand":{"type":"string","example":"Dupixent","description":"brand: required. merged: optional, adds questions about the brand and competitive ones. Not taken by agnostic."},"brandAliases":{"example":["dupilumab"],"maxItems":50,"description":"merged only: a question naming an alias gets scope \"brand\", as POST /v2/reports would require. Not sent to the model.","type":"array","items":{"type":"string"}},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"fr","description":"Language of the questions. Default en. One language per call."},"indications":{"example":["Atopic dermatitis"],"maxItems":30,"description":"brand only: indications the questions focus on","type":"array","items":{"type":"string"}},"excludeQuestions":{"description":"Questions already chosen, by category, so that they are not suggested again","allOf":[{"$ref":"#/components/schemas/V2ExcludedQuestionsDto"}]},"llm":{"type":"string","enum":["Perplexity","OpenAI"],"example":"Perplexity","description":"brand and agnostic only: the model with web search that finds the trending questions. Default: the server setting (Perplexity)."},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"example":"fr","description":"The one country the questions are for, given back on each question. Absent: null on each question, and POST /v2/reports applies the account default market."}},"required":["kind"]},"V2TrendingQuestionDto":{"type":"object","properties":{"text":{"type":"string","example":"Quels sont les nouveaux traitements de la dermatite atopique ?"},"scope":{"type":"string","enum":["agnostic","brand"],"example":"agnostic","description":"Scope to send with the question in POST /v2/reports or /v2/series. merged: \"brand\" for a question that names the brand and for competitive ones, \"agnostic\" otherwise. brand: always \"brand\". agnostic: always \"agnostic\"."},"category":{"type":"string","enum":["patient","professional","payer","competitive"],"example":"patient"},"source":{"type":"string","example":"https://www.doctissimo.fr/…","description":"Where the model saw the question asked, when it says so"},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"nullable":true,"example":"fr","description":"Country to send with the question: the market sent, or null"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"nullable":true,"example":"fr","description":"Language the question is written in: the one asked for, never a translation"}},"required":["text","scope","category","market","language"]},"V2TrendingQuestionsResultDto":{"type":"object","properties":{"kind":{"type":"string","enum":["merged","agnostic","brand"],"example":"merged"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"fr"},"questions":{"description":"Questions a model with web search reports as trending, grouped by category. They are not real prompts of patients or professionals. merged: competitive ones only with a brand, written with {COMPETITOR}. Empty when the model fails or finds nothing.","type":"array","items":{"$ref":"#/components/schemas/V2TrendingQuestionDto"}}},"required":["kind","language","questions"]},"SuggestV2CompetitorsDto":{"type":"object","properties":{"brand":{"type":"string","example":"Dupixent","description":"Brand (product) to find competitors for"},"language":{"type":"string","enum":["en","fr","de","es","it","pt","nl","sv","da","no","fi","pl","cs","sk","hu","ro","bg","hr","sl","et","lv","lt","el","ru","tr","uk","he","ar","zh","ja","ko","hi","th","vi","id","ms"],"example":"en","description":"Language of the answer. Default en."},"indications":{"example":["Atopic dermatitis"],"maxItems":30,"description":"Indications to look in. Without them the model infers them from the brand.","type":"array","items":{"type":"string"}},"market":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"],"example":"fr","description":"Country the competitors are looked for in: brand names as marketed there (Adtralza in France, Adbry in the US), indications approved there. Absent: the country where the language is mainly spoken."}},"required":["brand"]},"V2SuggestedCompetitorsResultDto":{"type":"object","properties":{"brand":{"type":"string","example":"Dupixent"},"competitors":{"example":["Adtralza","Ebglyss","Rinvoq"],"description":"At most 3 prescription medicines approved in the country for an indication of the brand, under their brand names there; only the ones the model sourced from a web search, so possibly fewer. To check before use","type":"array","items":{"type":"string"}},"indications":{"example":["atopic dermatitis","asthma"],"description":"Indications the brand is approved for in the country, found by the model with a source, in the language asked; possibly fewer than the real ones, never a symptom or a related condition","type":"array","items":{"type":"string"}}},"required":["brand","competitors","indications"]},"V2MergedLimitsDto":{"type":"object","properties":{"questionsUsed":{"type":"number","example":120,"description":"Questions of merged reports created since the last monthly reset, which comes with the monthly credits (a V2 report counts each question once per country). Not counted on an unlimited plan."},"questionsPerMonth":{"type":"number","nullable":true,"example":500,"description":"Monthly question quota of the plan; null when unlimited"},"remainingQuestions":{"type":"number","nullable":true,"example":380,"description":"Questions left until the next reset; null when unlimited"},"questionsPerReport":{"type":"number","nullable":true,"example":30,"description":"Questions a single report may hold; null when unlimited"}},"required":["questionsUsed","questionsPerMonth","remainingQuestions","questionsPerReport"]},"V2FamilyLimitsDto":{"type":"object","properties":{"canCreate":{"type":"boolean","example":true,"description":"A report of this family can be created now"},"reason":{"type":"string","nullable":true,"example":null,"description":"Why a report cannot be created, as /v1 words it; null when canCreate is true"},"reportsUsed":{"type":"number","example":2,"description":"Reports of this family created in the current month (cancelled reports that never started are not counted)"},"reportsLimit":{"type":"number","nullable":true,"example":10,"description":"Monthly report quota of the plan; null when unlimited (-1 in /v1)"},"remainingReports":{"type":"number","nullable":true,"example":8,"description":"Reports left this month; null when unlimited (-1 in /v1)"},"resetDate":{"type":"string","example":"2026-12-01T00:00:00.000Z","description":"Start of the next monthly window"}},"required":["canCreate","reason","reportsUsed","reportsLimit","remainingReports","resetDate"]},"V2AccountLimitsDto":{"type":"object","properties":{"merged":{"nullable":true,"description":"Merged reports; null for an inactive account","allOf":[{"$ref":"#/components/schemas/V2MergedLimitsDto"}]},"brand":{"nullable":true,"description":"Brand reports; null when the plan has no brand reports","allOf":[{"$ref":"#/components/schemas/V2FamilyLimitsDto"}]},"agnostic":{"nullable":true,"description":"Agnostic reports; null when the plan has no agnostic reports","allOf":[{"$ref":"#/components/schemas/V2FamilyLimitsDto"}]}},"required":["merged","brand","agnostic"]},"V2EngineDto":{"type":"object","properties":{"name":{"type":"string","example":"OpenAI","enum":["OpenAI","Perplexity","Claude","Gemini","Mistral","Grok","GoogleAIO","GoogleAIMode"],"description":"Name to send in llms or specificLlms when creating a report"},"kind":{"type":"string","example":"llm","enum":["llm","google-search"],"description":"llm: a language model asked by the server; google-search: Google AI Overviews or AI Mode, read from Google results"},"families":{"type":"array","example":["merged"],"description":"Report families of this account that accept this engine","items":{"type":"string","enum":["merged","agnostic","brand"]}}},"required":["name","kind","families"]},"V2EnginesResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V2EngineDto"}}},"required":["data"]},"V2AgentMessageDto":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"Author of the turn"},"content":{"type":"string","description":"Message text, 20000 characters at most","maxLength":20000}},"required":["role","content"]},"V2AgentDraftConfigDto":{"type":"object","properties":{"pathology":{"type":"string","description":"Canonical pathology"},"brand":{"type":"string","description":"Brand name — omit for market-only"},"brandAliases":{"type":"array","items":{"type":"string"}},"languages":{"example":["en","fr"],"type":"array","items":{"type":"string"}},"llms":{"example":["OpenAI","Claude","Gemini"],"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"trackedProducts":{"type":"array","items":{"type":"string"}},"ownedDomains":{"type":"array","items":{"type":"string"}},"trackedTerms":{"type":"array","items":{"type":"string"}},"customQuestionsPatient":{"type":"array","items":{"type":"string"}},"customQuestionsProfessional":{"type":"array","items":{"type":"string"}},"customQuestionsPayer":{"type":"array","items":{"type":"string"}},"customQuestionsCompetitor":{"type":"array","items":{"type":"string"}},"customQuestionsMarketPatient":{"description":"Market-scope (brand-agnostic) PATIENT questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"customQuestionsMarketProfessional":{"description":"Market-scope (brand-agnostic) PROFESSIONAL questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"customQuestionsMarketPayer":{"description":"Market-scope (brand-agnostic) PAYER questions — never name the brand or a competitor product","type":"array","items":{"type":"string"}},"personaAssignments":{"type":"array","items":{"$ref":"#/components/schemas/AgentPersonaAssignmentDto"}},"markets":{"type":"array","example":["fr"],"description":"Countries the report runs in: each question is asked once in each of them, as written (never translated). The agent asks the user for them; a report cannot be launched without them.","items":{"type":"string","enum":["us","ca","gb","fr","de","es","it","jp"]}}}},"V2AgentChatDto":{"type":"object","properties":{"messages":{"description":"Whole conversation, sent again at each turn (the server keeps no session): 200 messages and 200000 characters at most in all. The last one is the user turn.","type":"array","items":{"$ref":"#/components/schemas/V2AgentMessageDto"}},"draftConfig":{"description":"Report settings gathered so far, sent back as the previous reply gave them (100000 bytes at most once serialized)","allOf":[{"$ref":"#/components/schemas/V2AgentDraftConfigDto"}]},"conversationId":{"type":"string","description":"Saved conversation to continue (404 if it is not one of this account). Omit to start a new one."}},"required":["messages"]},"V2AgentChatReplyDto":{"type":"object","properties":{"reply":{"type":"string","description":"Assistant reply"},"draftConfig":{"description":"Report settings gathered so far: send them back with the next turn","allOf":[{"$ref":"#/components/schemas/V2AgentDraftConfigDto"}]},"readyToLaunch":{"type":"boolean","description":"The settings are complete: the agent can launch the report once the user confirms"},"conversationId":{"type":"string","nullable":true,"description":"Saved conversation of this turn; null when saving failed"},"launchedReportId":{"type":"string","description":"Report launched during this turn, readable with GET /v2/reports/{id}"},"missingFields":{"description":"Settings still missing before a launch","type":"array","items":{"type":"string"}}},"required":["reply","draftConfig","readyToLaunch","conversationId"]},"V2AgentConversationDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["agent","copilot"],"description":"agent: report building conversation; copilot: questions on one report"},"title":{"type":"string"},"reportId":{"type":"string","nullable":true,"description":"Report of a copilot conversation"},"messageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","kind","title","reportId","messageCount","createdAt","updatedAt"]},"V2AgentConversationListDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V2AgentConversationDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Pass as cursor to read the next page; null on the last page"}},"required":["data","nextCursor"]},"V2AgentConversationDetailDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["agent","copilot"],"description":"agent: report building conversation; copilot: questions on one report"},"title":{"type":"string"},"reportId":{"type":"string","nullable":true,"description":"Report of a copilot conversation"},"messageCount":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/V2AgentMessageDto"}},"draftConfig":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/V2AgentDraftConfigDto"}]}},"required":["id","kind","title","reportId","messageCount","createdAt","updatedAt","messages","draftConfig"]},"V2CopilotChatDto":{"type":"object","properties":{"messages":{"description":"Whole conversation, sent again at each turn: 200 messages and 200000 characters at most in all. The last one is the user question about the report.","type":"array","items":{"$ref":"#/components/schemas/V2AgentMessageDto"}},"conversationId":{"type":"string","description":"Saved conversation to continue (404 if it is not one of this account). Omit to start a new one."}},"required":["messages"]},"V2YouTubeChannelsDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeChannelMetricsDto"}}},"required":["data"]},"V2PublicAreaDto":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","description":"Id of the therapeutic area, for /evolution"},"pathology":{"type":"string","example":"Atopic Dermatitis"},"marketLabel":{"type":"string","nullable":true,"example":"France","description":"Free label of the area (the market of /v1), not a market code"},"lastReportAt":{"type":"string","nullable":true,"example":"2026-04-15T10:00:00.000Z","description":"Most recent report of the area"}},"required":["id","pathology"]},"V2PublicAreasDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V2PublicAreaDto"}}},"required":["data"]},"V2PublicSourcesDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicIndexSourceItemDto"}}},"required":["data"]},"V2AiOverviewsDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiOverviewItemDto"}}},"required":["data"]}}}}