{"components":{"schemas":{"Error":{"properties":{"code":{"description":"Machine-readable error code, e.g. `NOT_FOUND`.","examples":["NOT_FOUND"],"type":"string"},"data":{"description":"Optional structured error details."},"defined":{"description":"True if the error was declared in the procedure contract.","type":"boolean"},"message":{"description":"Human-readable error message.","type":"string"},"status":{"description":"HTTP status code.","examples":[404],"type":"integer"}},"required":["code","defined","message","status"],"type":"object"},"UndefinedError":{"properties":{"code":{"type":"string"},"data":{},"defined":{"const":false},"message":{"type":"string"},"status":{"type":"number"}},"required":["code","defined","message","status"],"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"Organization API key (`modem_…`).","scheme":"bearer","type":"http"}}},"info":{"description":"The public Modem API. Authenticate with an organization API key: `Authorization: Bearer modem_…`.","title":"Modem API","version":"1.0.0"},"openapi":"3.1.1","paths":{"/automation-templates":{"get":{"description":"List curated automation templates. Search matches template slugs, names, and subtitles;\nresults support page-based pagination and sorting by creation time or name.\n","operationId":"automations.listTemplates","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"exclusiveMinimum":0,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":50,"exclusiveMinimum":0,"maximum":100,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"search","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortBy","required":false,"schema":{"default":"createdAt","enum":["createdAt","name"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"name":{"type":"string"},"requiredIntegrations":{"items":{"type":"string"},"type":"array"},"slug":{"pattern":"^[a-z0-9-]+$","type":"string"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","requiredIntegrations","slug","subtitle"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List templates","tags":["Automations"]}},"/automation-templates/{slug}":{"get":{"description":"Get one template by slug: full prompt, default schedule, model level, output channels, and\nrequired integrations. Clients that support creating automations can pass the slug as\nsourceDefaultTaskSlug to link the new automation to its template.\n","operationId":"automations.getTemplate","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"modelLevel":{"description":"Model quality/speed tier persisted for automation execution.","enum":["high","low","med"],"title":"Scheduled Task Model Level","type":"string"},"name":{"type":"string"},"outputChannels":{"anyOf":[{"items":{"properties":{"channel":{"enum":["discord","email","slack"],"type":"string"},"destinations":{"anyOf":[{"items":{"minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"mode":{"enum":["any-internal","any","specific"],"type":"string"}},"required":["channel","destinations","mode"],"type":"object"},"type":"array"},{"type":"null"}]},"prompt":{"type":"string"},"relatedTemplates":{"items":{"type":"string"},"type":"array"},"requiredIntegrations":{"items":{"type":"string"},"type":"array"},"schedule":{"anyOf":[{"properties":{"expr":{"description":"Standard cron expression string.","minLength":1,"title":"Cron Expression","type":"string"},"type":{"const":"cron"}},"required":["expr","type"],"type":"object"},{"properties":{"rrule":{"description":"iCalendar recurrence rule (RFC 5545) string.","minLength":1,"title":"RRule","type":"string"},"type":{"const":"rrule"}},"required":["rrule","type"],"type":"object"},{"properties":{"at":{"description":"ISO 8601 timestamp for one-time execution.","minLength":1,"title":"At Time","type":"string"},"type":{"const":"at"}},"required":["at","type"],"type":"object"},{"properties":{"n":{"description":"Number of time units between executions.","exclusiveMinimum":0,"title":"Interval","type":"integer"},"type":{"const":"every"},"unit":{"description":"Time unit for interval scheduling.","enum":["hours","minutes"],"title":"Time Unit","type":"string"}},"required":["n","type","unit"],"type":"object"},{"properties":{"channelIds":{"description":"Optional channel scope: message channel UUIDs this automation is limited to. Omit for all channels (global). Only valid when every selected event supports channel scoping (see EVENT_CHANNEL_SCOPING).","items":{"format":"uuid","type":"string"},"minItems":1,"title":"Channel IDs","type":"array"},"delaySeconds":{"description":"Optional delay, in seconds, before running the automation after its trigger event fires (e.g. 1800 = 30 minutes after the event). Omit for immediate execution. Maximum 604800 (7 days).","maximum":604800,"minimum":1,"title":"Delay (seconds)","type":"integer"},"event":{"description":"Legacy single-event trigger (e.g., github.pr.created). Still accepted on read/write for backwards compatibility; prefer `events` for new writes. When both are present, `events` is canonical.","minLength":1,"title":"Event Name (legacy single-event form)","type":"string"},"events":{"description":"Trigger events for this automation (e.g., [\"github.pr.created\", \"github.pr.dismissed\"]). The automation fires once per matching event occurrence. Canonical form — prefer this over the legacy `event` field.","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"title":"Event Names","type":"array"},"productIds":{"description":"Optional product scope: the products this automation is limited to. Omit for all products (global); an empty array is rejected so 'global' has one representation. Acts as a channel preset — at dispatch time the scoped products' currently linked message channels (product_channels) are resolved and the automation fires when the triggering event's channels intersect ANY of them. It additionally instructs the agent to scope the run's output to those products. May be combined with channelIds — both scopes must pass (AND semantics).","items":{"format":"uuid","type":"string"},"minItems":1,"title":"Product IDs","type":"array"},"type":{"const":"event"}},"required":["type"],"type":"object"}],"description":"Defines when an automation should run.","title":"Schedule Specification"},"slug":{"pattern":"^[a-z0-9-]+$","type":"string"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["description","modelLevel","name","outputChannels","prompt","relatedTemplates","requiredIntegrations","schedule","slug","subtitle"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get template","tags":["Automations"]}},"/automations":{"post":{"description":"Create an automation for the API key's organization. Modem assigns the organization's earliest owner.\n\nProvide a complete automation definition. Event schedules accept canonical registered event names only.\nTo send output to Slack or Discord, provide sourceName and sourceChannelId together. Otherwise Modem uses\nthe organization's saved default output destination. Requests fail when no valid destination is available.\n\nThis operation supports Idempotency-Key and accepts organization API keys only; service JWTs are rejected.\n","operationId":"automations.createPublic","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"allowedCapabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Explicit capability keys when capabilityMode is custom. Null means all.","title":"Allowed Capabilities"},"capabilityMode":{"description":"Whether this task uses all visible capabilities or a custom subset.","enum":["all","custom"],"title":"Capability Mode","type":"string"},"enabled":{"type":"boolean"},"modelLevel":{"description":"Persisted model level for automation execution.","enum":["high","low","med"],"title":"Model Level","type":"string"},"name":{"minLength":1,"type":"string"},"prompt":{"maxLength":130000,"minLength":1,"type":"string"},"schedule":{"anyOf":[{"additionalProperties":false,"properties":{"expr":{"minLength":1,"type":"string"},"type":{"const":"cron"}},"required":["expr","type"],"type":"object"},{"additionalProperties":false,"properties":{"rrule":{"minLength":1,"type":"string"},"type":{"const":"rrule"}},"required":["rrule","type"],"type":"object"},{"additionalProperties":false,"properties":{"at":{"format":"date-time","type":"string"},"type":{"const":"at"}},"required":["at","type"],"type":"object"},{"additionalProperties":false,"properties":{"n":{"exclusiveMinimum":0,"type":"integer"},"type":{"const":"every"},"unit":{"enum":["hours","minutes"],"type":"string"}},"required":["n","type","unit"],"type":"object"},{"additionalProperties":false,"properties":{"delaySeconds":{"maximum":604800,"minimum":1,"type":"integer"},"events":{"items":{"enum":["github.issue.closed","github.pr.created","github.pr.dismissed","github.pr.merged","gitlab.mr.closed","gitlab.mr.created","gitlab.mr.merged","sentry.feedback.created","stripe.customer.created","stripe.invoice.payment_failed","stripe.subscription.canceled","stripe.subscription.created","stripe.subscription.trial_ending","topic.created","topic.group.added","topic.group.updated","topic.priority.high"],"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"type":{"const":"event"}},"required":["events","type"],"type":"object"}]},"templateSlug":{"pattern":"^[a-z0-9-]+$","type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["name","prompt","schedule","timezone"],"type":"object"},{"additionalProperties":false,"properties":{"allowedCapabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Explicit capability keys when capabilityMode is custom. Null means all.","title":"Allowed Capabilities"},"capabilityMode":{"description":"Whether this task uses all visible capabilities or a custom subset.","enum":["all","custom"],"title":"Capability Mode","type":"string"},"enabled":{"type":"boolean"},"modelLevel":{"description":"Persisted model level for automation execution.","enum":["high","low","med"],"title":"Model Level","type":"string"},"name":{"minLength":1,"type":"string"},"prompt":{"maxLength":130000,"minLength":1,"type":"string"},"schedule":{"anyOf":[{"additionalProperties":false,"properties":{"expr":{"minLength":1,"type":"string"},"type":{"const":"cron"}},"required":["expr","type"],"type":"object"},{"additionalProperties":false,"properties":{"rrule":{"minLength":1,"type":"string"},"type":{"const":"rrule"}},"required":["rrule","type"],"type":"object"},{"additionalProperties":false,"properties":{"at":{"format":"date-time","type":"string"},"type":{"const":"at"}},"required":["at","type"],"type":"object"},{"additionalProperties":false,"properties":{"n":{"exclusiveMinimum":0,"type":"integer"},"type":{"const":"every"},"unit":{"enum":["hours","minutes"],"type":"string"}},"required":["n","type","unit"],"type":"object"},{"additionalProperties":false,"properties":{"delaySeconds":{"maximum":604800,"minimum":1,"type":"integer"},"events":{"items":{"enum":["github.issue.closed","github.pr.created","github.pr.dismissed","github.pr.merged","gitlab.mr.closed","gitlab.mr.created","gitlab.mr.merged","sentry.feedback.created","stripe.customer.created","stripe.invoice.payment_failed","stripe.subscription.canceled","stripe.subscription.created","stripe.subscription.trial_ending","topic.created","topic.group.added","topic.group.updated","topic.priority.high"],"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"type":{"const":"event"}},"required":["events","type"],"type":"object"}]},"sourceChannelId":{"minLength":1,"type":"string"},"sourceName":{"enum":["discord","slack"],"type":"string"},"templateSlug":{"pattern":"^[a-z0-9-]+$","type":"string"},"timezone":{"minLength":1,"type":"string"}},"required":["name","prompt","schedule","sourceChannelId","sourceName","timezone"],"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"allowedCapabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Explicit capability keys when capabilityMode is custom. Null means all.","title":"Allowed Capabilities"},"capabilityMode":{"description":"Whether this task uses all visible capabilities or a custom subset.","enum":["all","custom"],"title":"Capability Mode","type":"string"},"createdAt":{"description":"Timestamp when the task was created.","format":"date-time","title":"Created At","type":"string"},"enabled":{"description":"Whether the task is actively being scheduled.","title":"Enabled","type":"boolean"},"id":{"format":"uuid","type":"string"},"lastAttemptAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the most recent execution attempt started, including manual runs.","title":"Last Attempt At"},"lastErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Most recent error message if status is error.","title":"Last Error Message"},"lastRunAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp of the most recent scheduler-managed execution, used to calculate the next run.","title":"Last Run At"},"modelLevel":{"description":"Persisted model level for automation execution.","enum":["high","low","med"],"title":"Model Level","type":"string"},"name":{"description":"Human-readable name for the automation.","minLength":1,"title":"Name","type":"string"},"nextRunAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp of the next scheduled execution.","title":"Next Run At"},"outputChannels":{"items":{"properties":{"channel":{"enum":["discord","email","slack"],"type":"string"},"destinations":{"anyOf":[{"items":{"minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"mode":{"enum":["any-internal","any","specific"],"type":"string"}},"required":["channel","destinations","mode"],"type":"object"},"minItems":1,"type":"array"},"prompt":{"description":"AI prompt or instructions executed when the task runs.","minLength":1,"title":"Prompt","type":"string"},"schedule":{"anyOf":[{"additionalProperties":false,"properties":{"expr":{"minLength":1,"type":"string"},"type":{"const":"cron"}},"required":["expr","type"],"type":"object"},{"additionalProperties":false,"properties":{"rrule":{"minLength":1,"type":"string"},"type":{"const":"rrule"}},"required":["rrule","type"],"type":"object"},{"additionalProperties":false,"properties":{"at":{"format":"date-time","type":"string"},"type":{"const":"at"}},"required":["at","type"],"type":"object"},{"additionalProperties":false,"properties":{"n":{"exclusiveMinimum":0,"type":"integer"},"type":{"const":"every"},"unit":{"enum":["hours","minutes"],"type":"string"}},"required":["n","type","unit"],"type":"object"},{"additionalProperties":false,"properties":{"delaySeconds":{"maximum":604800,"minimum":1,"type":"integer"},"events":{"items":{"enum":["github.issue.closed","github.pr.created","github.pr.dismissed","github.pr.merged","gitlab.mr.closed","gitlab.mr.created","gitlab.mr.merged","sentry.feedback.created","stripe.customer.created","stripe.invoice.payment_failed","stripe.subscription.canceled","stripe.subscription.created","stripe.subscription.trial_ending","topic.created","topic.group.added","topic.group.updated","topic.priority.high"],"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"type":{"const":"event"}},"required":["events","type"],"type":"object"}]},"status":{"description":"Current health status of the automation.","enum":["completed","error","healthy","paused"],"title":"Status","type":"string"},"templateSlug":{"anyOf":[{"pattern":"^[a-z0-9-]+$","type":"string"},{"type":"null"}]},"timezone":{"description":"IANA timezone identifier for schedule evaluation.","minLength":1,"title":"Timezone","type":"string"},"updatedAt":{"description":"Timestamp when the task was last updated.","format":"date-time","title":"Updated At","type":"string"}},"required":["allowedCapabilities","capabilityMode","enabled","id","lastErrorMessage","modelLevel","name","outputChannels","prompt","schedule","status","templateSlug","timezone"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Create automation","tags":["Automations"]}},"/channels":{"get":{"description":"List all channels for an organization with message counts","operationId":"channels.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sourceName","required":false,"schema":{"description":"Filter channels by source (e.g., slack, discord). Omit for all sources.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"search","required":false,"schema":{"description":"Search channels by name. Omit when not searching.","minLength":1,"title":"Search","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"ids","required":false,"schema":{"description":"Filter to specific channel IDs (e.g., to resolve names for a stored channel scope). Omit when not filtering by ID.","items":{"format":"uuid","type":"string"},"maxItems":100,"minItems":1,"title":"Channel IDs","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"connectedOnly","required":false,"schema":{"description":"Only return channels whose backing integration is still connected. Currently filters GitHub repo channels to repositories with non-revoked access; other sources are unaffected. Omit to include all channels.","title":"Connected Only","type":"boolean"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"description":"The 1-based page number to return (default 1).","exclusiveMinimum":0,"title":"Page","type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Maximum number of channels to return (default 50, max 100)","exclusiveMinimum":0,"maximum":100,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"channelName":{"description":"Human-readable name of the channel.","title":"Channel Name","type":"string"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided context about the channel purpose and how to prioritize messages. Used by LLM for message grouping, topic extraction, and priority scoring.","title":"Context"},"createdAt":{"description":"ISO 8601 timestamp of channel creation","format":"date-time","title":"Created At","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of the channel.","title":"Description"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isConnected":{"description":"Whether the source server/workspace is currently connected (bot has not left)","title":"Is Connected","type":"boolean"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp of the most recent message in this channel, or null if no messages","title":"Last Seen At"},"messageCount":{"description":"Total number of messages in this channel","minimum":0,"title":"Message Count","type":"integer"},"serverName":{"description":"Human-readable name of the server/workspace.","title":"Server Name","type":"string"},"sourceChannelId":{"description":"Channel identifier in the source system.","title":"Source Channel ID","type":"string"},"sourceName":{"description":"Source system for the channel.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceServerId":{"description":"Identifier of the server/workspace in the source system.","title":"Source Server ID","type":"string"},"updatedAt":{"description":"ISO 8601 timestamp of last channel update","format":"date-time","title":"Updated At","type":"string"}},"required":["channelName","context","createdAt","description","id","isConnected","lastSeenAt","messageCount","serverName","sourceChannelId","sourceName","sourceServerId","updatedAt"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List channels","tags":["Channels"]}},"/channels/{channelId}":{"get":{"description":"Get a single channel by ID","operationId":"channels.get","parameters":[{"in":"path","name":"channelId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"channelName":{"description":"Human-readable name of the channel.","title":"Channel Name","type":"string"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided context about the channel purpose and how to prioritize messages. Used by LLM for message grouping, topic extraction, and priority scoring.","title":"Context"},"createdAt":{"description":"ISO 8601 timestamp of channel creation","format":"date-time","title":"Created At","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of the channel.","title":"Description"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isConnected":{"description":"Whether the source server/workspace is currently connected (bot has not left)","title":"Is Connected","type":"boolean"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp of the most recent message in this channel, or null if no messages","title":"Last Seen At"},"messageCount":{"description":"Total number of messages in this channel","minimum":0,"title":"Message Count","type":"integer"},"serverName":{"description":"Human-readable name of the server/workspace.","title":"Server Name","type":"string"},"sourceChannelId":{"description":"Channel identifier in the source system.","title":"Source Channel ID","type":"string"},"sourceName":{"description":"Source system for the channel.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceServerId":{"description":"Identifier of the server/workspace in the source system.","title":"Source Server ID","type":"string"},"updatedAt":{"description":"ISO 8601 timestamp of last channel update","format":"date-time","title":"Updated At","type":"string"}},"required":["channelName","context","createdAt","description","id","isConnected","lastSeenAt","messageCount","serverName","sourceChannelId","sourceName","sourceServerId","updatedAt"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get channel","tags":["Channels"]}},"/companies":{"get":{"description":"List companies with aggregated statistics across all associated persons","operationId":"companies.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"exclusiveMinimum":0,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":50,"exclusiveMinimum":0,"maximum":100,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"search","required":false,"schema":{"minLength":1,"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortBy","required":false,"schema":{"default":"lastSeen","enum":["lastSeen","messageCount","personCount"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"pattern":"^\\d+$","type":"string"},"isOrgCompany":{"type":"boolean"},"isVip":{"type":"boolean"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Company logo image URL.","title":"Logo URL"},"messageCount":{"type":"integer"},"name":{"description":"Company name.","title":"Name","type":"string"},"personCount":{"type":"integer"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","isOrgCompany","isVip","logoUrl","messageCount","name","personCount","primaryDomain"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List companies","tags":["Companies"]},"post":{"description":"Batch endpoint (batch-first): create one or more companies with domains. Supports partial success - each company is created independently.","operationId":"companies.createCompanies","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"companies":{"items":{"properties":{"domain":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"}},"required":["domain","name"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["companies"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"properties":{"domains":{"items":{"type":"string"},"type":"array"},"firstSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"pattern":"^\\d+$","type":"string"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Company logo image URL.","title":"Logo URL"},"messageCount":{"type":"integer"},"name":{"description":"Company name.","title":"Name","type":"string"},"personCount":{"type":"integer"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["domains","id","logoUrl","messageCount","name","personCount","primaryDomain"],"type":"object"},"domain":{"type":"string"},"error":{"type":"string"},"name":{"type":"string"},"success":{"type":"boolean"}},"required":["domain","name","success"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Create companies","tags":["Companies"]}},"/companies/bulk":{"patch":{"description":"Batch endpoint: update fields on one or more companies (name, logoUrl, isVip, primaryDomain, connections). Supports partial success - each company is updated independently. Use the single-resource PATCH /companies/{companyId} for one company.","operationId":"companies.bulkUpdate","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"companies":{"items":{"properties":{"companyId":{"pattern":"^\\d+$","type":"string"},"connections":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object"},"isVip":{"type":"boolean"},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"name":{"minLength":1,"type":"string"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["companyId"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["companies"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"companyId":{"anyOf":[{"type":"string"},{"type":"string"}]},"data":{"properties":{"connections":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","github","linkedin","phone","twitter"],"type":"object"},"id":{"pattern":"^\\d+$","type":"string"},"isVip":{"type":"boolean"},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Company logo image URL.","title":"Logo URL"},"name":{"description":"Company name.","title":"Name","type":"string"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connections","id","isVip","logoUrl","name","primaryDomain"],"type":"object"},"error":{"type":"string"},"success":{"type":"boolean"}},"required":["companyId","success"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Bulk update","tags":["Companies"]}},"/companies/merge":{"post":{"description":"Merge multiple companies into a single target company. All domains, person associations, and Slack workspaces are moved to the target.","operationId":"companies.merge","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"sourceCompanyIds":{"items":{"pattern":"^\\d+$","type":"string"},"minItems":1,"type":"array"},"targetCompanyId":{"pattern":"^\\d+$","type":"string"}},"required":["sourceCompanyIds","targetCompanyId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"mergedCount":{"type":"integer"}},"required":["mergedCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Merge companies","tags":["Companies"]}},"/companies/{companyId}":{"get":{"description":"Get a single company by ID with basic details and connections","operationId":"companies.get","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"connections":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","github","linkedin","phone","twitter"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^\\d+$","type":"string"},"isOrgCompany":{"type":"boolean"},"isVip":{"type":"boolean"},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Company logo image URL.","title":"Logo URL"},"name":{"description":"Company name.","title":"Name","type":"string"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connections","id","isOrgCompany","isVip","logoUrl","name","primaryDomain"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get company","tags":["Companies"]},"patch":{"description":"Update a single company (name, logoUrl, isVip, primaryDomain, connections). At least one field must be provided; omitted fields are left unchanged and null clears a nullable field.","operationId":"companies.update","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}},{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"connections":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object"},"isVip":{"type":"boolean"},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"name":{"minLength":1,"type":"string"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"connections":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","github","linkedin","phone","twitter"],"type":"object"},"id":{"pattern":"^\\d+$","type":"string"},"isVip":{"type":"boolean"},"logoUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Company logo image URL.","title":"Logo URL"},"name":{"description":"Company name.","title":"Name","type":"string"},"primaryDomain":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connections","id","isVip","logoUrl","name","primaryDomain"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Update company","tags":["Companies"]}},"/companies/{companyId}/activity":{"get":{"description":"Get message-based activity stats for a company (message count, weekly activity, source breakdown)","operationId":"companies.getActivity","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"messageCount":{"type":"integer"},"sourceStats":{"items":{"properties":{"messageCount":{"type":"integer"},"source":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["messageCount","source"],"type":"object"},"type":"array"},"weeklyActivity":{"items":{"type":"integer"},"type":"array"}},"required":["messageCount","sourceStats","weeklyActivity"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get activity","tags":["Companies"]}},"/companies/{companyId}/history":{"get":{"description":"Get change history for a company. Returns audit trail of modifications with user attribution.","operationId":"companies.getHistory","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"changedByFilter","required":false,"schema":{"description":"Filter by actor type. Defaults to user and agent changes (excludes system).","items":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"title":"Changed By Filter","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":20,"description":"Maximum number of history records to return (default 20, max 50).","exclusiveMinimum":0,"maximum":50,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"history":{"items":{"properties":{"changedAt":{"format":"date-time","type":"string"},"changedBy":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"changes":{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"operation":{"description":"Type of database operation that triggered the history record.","enum":["DELETE","INSERT","UPDATE"],"title":"Topic History Operation","type":"string"},"previousValues":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["changedBy","changes","id","operation","previousValues","user"],"type":"object"},"type":"array"},"mergedInto":{"anyOf":[{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"targetCompany":{"anyOf":[{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","targetCompany","user"],"type":"object"},{"type":"null"}]},"merges":{"items":{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"sourceCompanies":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","sourceCompanies","user"],"type":"object"},"type":"array"},"totalCount":{"type":"number"}},"required":["history","mergedInto","merges","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get history","tags":["Companies"]}},"/companies/{companyId}/identities":{"get":{"description":"Get external platform identities linked to a company (e.g. a Stripe customer matched by email domain). Links are written by POST /identify.","operationId":"companies.getIdentities","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"identities":{"items":{"properties":{"id":{"type":"string"},"platform":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"platformId":{"type":"string"},"platformUsername":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","platform","platformId","platformUsername"],"type":"object"},"type":"array"}},"required":["identities"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get identities","tags":["Companies"]}},"/companies/{companyId}/people":{"post":{"description":"Add multiple people to a company","operationId":"companies.addPeople","parameters":[{"in":"path","name":"companyId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}},{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"personIds":{"items":{"pattern":"^\\d+$","type":"string"},"minItems":1,"type":"array"}},"required":["personIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"addedCount":{"type":"integer"},"skippedCount":{"type":"integer"}},"required":["addedCount","skippedCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Add people","tags":["Companies"]}},"/groups":{"get":{"description":"List message groups (conversations) for a single company or person. Provide exactly one of companyId or personId.","operationId":"groups.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"companyId","required":false,"schema":{"pattern":"^\\d+$","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"personId","required":false,"schema":{"pattern":"^\\d+$","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"exclusiveMinimum":0,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":20,"exclusiveMinimum":0,"maximum":50,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"group":{"properties":{"archivedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the group was archived.","title":"Archived At"},"endTimestamp":{"description":"Timestamp for the end of the group time range.","title":"End Timestamp"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"startTimestamp":{"description":"Timestamp for the start of the group time range.","title":"Start Timestamp"}},"required":["id"],"type":"object"},"messages":{"items":{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]},"channel":{"anyOf":[{"properties":{"channelName":{"type":"string"},"id":{"type":"string"},"serverName":{"type":"string"}},"required":["channelName","id","serverName"],"type":"object"},{"type":"null"}]},"reactions":{"items":{"properties":{"count":{"description":"Number of times this reaction was used.","exclusiveMinimum":0,"title":"Count","type":"integer"},"identifier":{"description":"Normalized reaction identifier (e.g., \"thumbsup\", \"heart\").","title":"Identifier","type":"string"},"messageId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}],"description":"ID of the message this reaction belongs to.","title":"Message ID"},"unicode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unicode representation of the emoji if applicable.","title":"Unicode"}},"required":["count","identifier","messageId","unicode"],"type":"object"},"type":"array"},"replyTo":{"anyOf":[{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]}},"required":["author"],"type":"object"}]},{"type":"null"}]},"thread":{"anyOf":[{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]}},"required":["author"],"type":"object"}]},{"type":"null"}]}},"required":["author","channel","reactions","replyTo","thread"],"type":"object"}]},"type":"array"},"topic":{"anyOf":[{"properties":{"isV2":{"type":"boolean"},"keywords":{"items":{"type":"string"},"type":"array"},"linkedIssueKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"sources":{"items":{"type":"string"},"type":"array"},"topicId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"topicTitle":{"type":"string"},"topicType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["isV2","keywords","linkedIssueKey","sources","topicId","topicTitle","topicType"],"type":"object"},{"type":"null"}]}},"required":["group","messages","topic"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List groups","tags":["Groups"]}},"/identify":{"post":{"description":"Idempotently link external platform records (e.g. Stripe customers) to Modem people and companies.\n\nEach `person` / `company` block states the facts the platform knows about that side of the record — not an assertion of how to resolve it. Modem owns all matching.\n\n**Person** — matched by platform `identity` first, then by exact `email`. A bare email matches an existing person but never creates one (it may be a shared inbox like billing@); creation requires `displayName`.\n\n**Company** — matched by the first hit, in trust order:\n\n1. an existing platform `identity` link for this block\n2. the resolved person's current company\n3. stated `domains`, then the domain derived from `person.email` (free-mail domains such as gmail.com carry no signal)\n4. an exact, case-insensitive `name` match\n5. otherwise created — only when `name` is stated\n\nWhen both a person and a company resolve, their membership is recorded.\n\nIf the platform identity and a natural key (email/domain) resolve to different entities, the identity match wins and nothing is merged; the other entity is returned as `conflictWith` — a probable duplicate to reconcile deliberately.\n\nRemoving a stored link is not part of this endpoint; it will ship separately.","operationId":"identities.identify","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"identifications":{"items":{"properties":{"company":{"properties":{"description":{"minLength":1,"type":"string"},"domains":{"description":"Natural keys. Matches (or create-seeds) a company by domain. A free-mail domain never matches, creates, or is stamped (no signal), but does not suppress name-keyed creation.","items":{"minLength":1,"type":"string"},"maxItems":10,"type":"array"},"identity":{"description":"Platform pointer. Matched identity-first; upserted onto the matched/created company.","properties":{"platform":{"description":"Source platform slug (e.g. \"stripe\", \"salesforce\").","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"platformId":{"description":"The record id on the platform (e.g. a Stripe customer id like \"cus_…\").","minLength":1,"type":"string"}},"required":["platform","platformId"],"type":"object"},"logoUrl":{"format":"uri","type":"string"},"name":{"description":"Enables creation when no match is found.","minLength":1,"type":"string"},"overwrite":{"description":"Scalar fields to overwrite even when already populated. Default is set-once.","items":{"enum":["description","logoUrl","name"],"type":"string"},"type":"array"}},"type":"object"},"person":{"properties":{"avatarUrl":{"format":"uri","type":"string"},"description":{"minLength":1,"type":"string"},"displayName":{"description":"Enables creation when no match is found.","minLength":1,"type":"string"},"email":{"description":"Natural key. Matches a person by exact, lowercased email. Never creates on its own.","format":"email","type":"string"},"identity":{"description":"Platform pointer. Matched identity-first; upserted onto the matched/created person.","properties":{"platform":{"description":"Source platform slug (e.g. \"stripe\", \"salesforce\").","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"platformId":{"description":"The record id on the platform (e.g. a Stripe customer id like \"cus_…\").","minLength":1,"type":"string"}},"required":["platform","platformId"],"type":"object"},"overwrite":{"description":"Scalar fields to overwrite even when already populated. Default is set-once.","items":{"enum":["avatarUrl","description","displayName"],"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["identifications"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"company":{"anyOf":[{"properties":{"conflictWith":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A probable duplicate surfaced as a merge candidate: the platform identity resolved to `id`, but the natural key (email/domain) is owned by this different existing entity. identify never merges — it's left for a deliberate merge. Null when there was no conflict."},"created":{"type":"boolean"},"id":{"type":"string"}},"required":["conflictWith","created","id"],"type":"object"},{"type":"null"}]},"membershipLinked":{"type":"boolean"},"person":{"anyOf":[{"properties":{"conflictWith":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A probable duplicate surfaced as a merge candidate: the platform identity resolved to `id`, but the natural key (email/domain) is owned by this different existing entity. identify never merges — it's left for a deliberate merge. Null when there was no conflict."},"created":{"type":"boolean"},"id":{"type":"string"}},"required":["conflictWith","created","id"],"type":"object"},{"type":"null"}]}},"required":["company","membershipLinked","person"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Link external records to people and companies","tags":["Identify"]}},"/people":{"get":{"description":"List people with aggregated message statistics across all their platform identities","operationId":"people.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"exclusiveMinimum":0,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":50,"exclusiveMinimum":0,"maximum":100,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"search","required":false,"schema":{"minLength":1,"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortBy","required":false,"schema":{"default":"lastSeen","enum":["lastSeen","messageCount"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"ecosystemTags","required":false,"schema":{"description":"Filter by ecosystem tags (OR match)","items":{"minLength":1,"type":"string"},"type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"companyId","required":false,"schema":{"description":"Filter to people currently associated with this company","pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL for the person.","title":"Avatar URL"},"company":{"anyOf":[{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["domain","id","logoUrl","name"],"type":"object"},{"type":"null"}]},"displayName":{"description":"Display name for the person.","title":"Display Name","type":"string"},"id":{"pattern":"^\\d+$","type":"string"},"identities":{"items":{"properties":{"platform":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"platformId":{"type":"string"}},"required":["platform","platformId"],"type":"object"},"type":"array"},"identityCount":{"type":"integer"},"isVip":{"type":"boolean"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"latestTopic":{"anyOf":[{"properties":{"isV2":{"type":"boolean"},"lastMessageAt":{"format":"date-time","type":"string"},"topicId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"topicTitle":{"type":"string"},"topicType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["isV2","topicId","topicTitle","topicType"],"type":"object"},{"type":"null"}]},"messageCount":{"type":"integer"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]},"sources":{"items":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"type":"array"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"weeklyActivity":{"items":{"type":"integer"},"type":"array"}},"required":["avatarUrl","company","displayName","id","identities","identityCount","isVip","latestTopic","messageCount","primaryEmail","sources","title","weeklyActivity"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List people","tags":["People"]},"post":{"description":"Create one or more people. Batch-first: always pass a `people` array (use a single-element array to create one person). Supports partial success - each person is created independently.","operationId":"people.createPeople","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"people":{"items":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"maxLength":255,"minLength":1,"type":"string"},"isVip":{"type":"boolean"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":["displayName"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["people"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL for the person.","title":"Avatar URL"},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["github","linkedin","phone","title","twitter","website"],"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"description":"Display name for the person.","title":"Display Name","type":"string"},"id":{"pattern":"^\\d+$","type":"string"},"isVip":{"type":"boolean"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":["avatarUrl","connections","description","displayName","id","isVip","primaryEmail"],"type":"object"},"displayName":{"type":"string"},"error":{"type":"string"},"success":{"type":"boolean"}},"required":["displayName","success"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Create people","tags":["People"]}},"/people/bulk":{"patch":{"description":"Batch endpoint: update fields on one or more people (displayName, avatarUrl, description, isVip, primaryEmail, connections). Supports partial success - each person is updated independently. Use the single-resource PATCH /people/{personId} for one person.","operationId":"people.bulkUpdate","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"people":{"items":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"minLength":1,"type":"string"},"isVip":{"type":"boolean"},"personId":{"pattern":"^\\d+$","type":"string"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":["personId"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["people"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL for the person.","title":"Avatar URL"},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["github","linkedin","phone","title","twitter","website"],"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"description":"Display name for the person.","title":"Display Name","type":"string"},"id":{"pattern":"^\\d+$","type":"string"},"isVip":{"type":"boolean"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":["avatarUrl","connections","description","displayName","id","isVip","primaryEmail"],"type":"object"},"error":{"type":"string"},"personId":{"type":"string"},"success":{"type":"boolean"}},"required":["personId","success"],"type":"object"},"type":"array"}},"required":["results"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Bulk update","tags":["People"]}},"/people/merge":{"post":{"description":"Merge multiple people into a single target person. All identities, emails, and company associations are moved to the target.","operationId":"people.merge","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"sourcePersonIds":{"items":{"pattern":"^\\d+$","type":"string"},"minItems":1,"type":"array"},"targetPersonId":{"pattern":"^\\d+$","type":"string"}},"required":["sourcePersonIds","targetPersonId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"mergedCount":{"type":"integer"}},"required":["mergedCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Merge people","tags":["People"]}},"/people/{personId}":{"get":{"description":"Get a single person by ID with aggregated stats across all identities","operationId":"people.get","parameters":[{"in":"path","name":"personId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL for the person.","title":"Avatar URL"},"avgMessagesPerWeek":{"type":"number"},"company":{"anyOf":[{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"employees":{"items":{"properties":{"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"}},"required":["avatarUrl","id","name"],"type":"object"},"type":"array"},"id":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["domain","employees","id","logoUrl","name"],"type":"object"},{"type":"null"}]},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["github","linkedin","phone","title","twitter","website"],"type":"object"},"conversationCount":{"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"description":"Display name for the person.","title":"Display Name","type":"string"},"ecosystemTags":{"items":{"type":"string"},"type":"array"},"expertiseTags":{"items":{"type":"string"},"type":"array"},"firstSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"pattern":"^\\d+$","type":"string"},"identityCount":{"type":"integer"},"isVip":{"type":"boolean"},"lastSeenAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"messageCount":{"type":"integer"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]},"sources":{"items":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"type":"array"},"weeklyActivity":{"items":{"type":"integer"},"type":"array"}},"required":["avatarUrl","avgMessagesPerWeek","company","connections","conversationCount","description","displayName","ecosystemTags","expertiseTags","id","identityCount","isVip","messageCount","primaryEmail","sources","weeklyActivity"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get person","tags":["People"]},"patch":{"description":"Update a single person (displayName, avatarUrl, description, isVip, primaryEmail, connections). At least one field must be provided; omitted fields are left unchanged and null clears a nullable field.","operationId":"people.update","parameters":[{"in":"path","name":"personId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}},{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"minLength":1,"type":"string"},"isVip":{"type":"boolean"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"avatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL for the person.","title":"Avatar URL"},"connections":{"properties":{"github":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["github","linkedin","phone","title","twitter","website"],"type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"description":"Display name for the person.","title":"Display Name","type":"string"},"id":{"pattern":"^\\d+$","type":"string"},"isVip":{"type":"boolean"},"primaryEmail":{"anyOf":[{"format":"email","type":"string"},{"type":"null"}]}},"required":["avatarUrl","connections","description","displayName","id","isVip","primaryEmail"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Update person","tags":["People"]}},"/people/{personId}/history":{"get":{"description":"Get change history for a person. Returns audit trail of modifications with user attribution.","operationId":"people.getHistory","parameters":[{"in":"path","name":"personId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"changedByFilter","required":false,"schema":{"description":"Filter by actor type. Defaults to user and agent changes (excludes system).","items":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"title":"Changed By Filter","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":20,"description":"Maximum number of history records to return (default 20, max 50).","exclusiveMinimum":0,"maximum":50,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"history":{"items":{"properties":{"changedAt":{"format":"date-time","type":"string"},"changedBy":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"changes":{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"operation":{"description":"Type of database operation that triggered the history record.","enum":["DELETE","INSERT","UPDATE"],"title":"Topic History Operation","type":"string"},"previousValues":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["changedBy","changes","id","operation","previousValues","user"],"type":"object"},"type":"array"},"mergedInto":{"anyOf":[{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"targetPerson":{"anyOf":[{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","targetPerson","user"],"type":"object"},{"type":"null"}]},"merges":{"items":{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"sourcePersons":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","sourcePersons","user"],"type":"object"},"type":"array"},"totalCount":{"type":"number"}},"required":["history","mergedInto","merges","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get history","tags":["People"]}},"/people/{personId}/identities":{"get":{"description":"Get all platform identities linked to a person","operationId":"people.getIdentities","parameters":[{"in":"path","name":"personId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"author":{"anyOf":[{"properties":{"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"},"id":{"type":"string"}},"required":["avatarUrl","displayName","id"],"type":"object"},{"type":"null"}]},"id":{"type":"string"},"isPrimary":{"type":"boolean"},"platform":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"platformId":{"type":"string"},"platformUsername":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["author","id","isPrimary","platform","platformId","platformUsername"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get identities","tags":["People"]}},"/people/{personId}/source-stats":{"get":{"description":"Get message statistics by source platform for a person","operationId":"people.getSourceStats","parameters":[{"in":"path","name":"personId","required":true,"schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"messageCount":{"type":"integer"},"source":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["messageCount","source"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get source stats","tags":["People"]}},"/stories":{"get":{"description":"List generated stories for an organization.","operationId":"stories.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"bucket","required":false,"schema":{"default":"everything","enum":["archived","everything","for-you","unread"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"archivedCount":{"minimum":0,"type":"integer"},"everythingCount":{"minimum":0,"type":"integer"},"forYouCount":{"minimum":0,"type":"integer"},"stories":{"items":{"properties":{"archive":{"anyOf":[{"properties":{"actor":{"anyOf":[{"properties":{"name":{"const":"Modem Agent"},"type":{"const":"agent"}},"required":["name","type"],"type":"object"},{"properties":{"image":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},{"type":"null"}]},"name":{"type":"string"},"type":{"const":"member"},"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]}},"required":["image","name","type","userId"],"type":"object"}]},"archivedAt":{"format":"date-time","type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actor","reason"],"type":"object"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"draft":{"additionalProperties":false,"properties":{"detail":{"additionalProperties":false,"properties":{"main":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{},"type":{}},"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{},"type":{}},"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"sidebar":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{},"type":{}},"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"anyOf":[{},{"type":"null"}]},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{},"type":{}},"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"anyOf":[{},{"type":"null"}]},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"title":{}},"required":["main","sidebar"],"type":"object"},"list":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"maxLength":240,"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{},"value":{}},"type":"object"},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"label":{},"meta":{},"state":{}},"type":"object"},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"maxLength":60,"minLength":1,"type":"string"},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"type":"array"},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"label":{},"tooltip":{},"value":{},"valueLabel":{}},"type":"object"},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"minimum":0,"type":"integer"},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"detail":{},"label":{},"time":{},"tone":{}},"type":"object"},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"additionalProperties":false,"properties":{"description":{},"label":{},"recommended":{},"tone":{}},"type":"object"},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"additionalProperties":false,"properties":{"avatar":{},"avatarUrl":{},"entityRef":{},"name":{},"organization":{},"role":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"additionalProperties":false,"properties":{"href":{},"id":{},"sourceRefId":{},"title":{},"type":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"slug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"sourceRefs":{"default":[],"items":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"label":{"maxLength":180,"minLength":1,"type":"string"},"type":{"enum":["author","company","email","intercom","issue","message","person","slack","topic"],"type":"string"}},"required":["id","type"],"type":"object"},"maxItems":24,"type":"array"},"summary":{},"title":{},"version":{"const":1}},"required":["detail","list","slug","version"],"type":"object"},"isRead":{"type":"boolean"},"viewerRelevance":{"anyOf":[{"properties":{"linkedAuthorIds":{"items":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"type":"array"},"memberId":{"anyOf":[{"type":"string"},{"type":"string"}]},"relevanceKind":{"enum":["action","awareness","ownership"],"type":"string"},"relevanceLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevanceRationale":{"type":"string"},"user":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},{"type":"null"}]},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"}},"required":["linkedAuthorIds","memberId","relevanceKind","relevanceLabel","relevanceRationale","user"],"type":"object"},{"type":"null"}]}},"required":["archive","draft","isRead","viewerRelevance"],"type":"object"},"type":"array"},"unreadCount":{"minimum":0,"type":"integer"},"visitedThrough":{"format":"date-time","type":"string"}},"required":["archivedCount","everythingCount","forYouCount","stories","unreadCount","visitedThrough"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List stories","tags":["Stories"]}},"/stories/{slug}":{"get":{"description":"Get a single generated story by slug.","operationId":"stories.get","parameters":[{"in":"path","name":"slug","required":true,"schema":{"minLength":1,"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"includeArchived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"story":{"properties":{"archive":{"anyOf":[{"properties":{"actor":{"anyOf":[{"properties":{"name":{"const":"Modem Agent"},"type":{"const":"agent"}},"required":["name","type"],"type":"object"},{"properties":{"image":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},{"type":"null"}]},"name":{"type":"string"},"type":{"const":"member"},"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]}},"required":["image","name","type","userId"],"type":"object"}]},"archivedAt":{"format":"date-time","type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actor","reason"],"type":"object"},{"type":"null"}]},"createdAt":{"format":"date-time","type":"string"},"draft":{"additionalProperties":false,"properties":{"detail":{"additionalProperties":false,"properties":{"main":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"maxLength":240,"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{},"value":{}},"type":"object"},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"label":{},"meta":{},"state":{}},"type":"object"},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"maxLength":60,"minLength":1,"type":"string"},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"type":"array"},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"label":{},"tooltip":{},"value":{},"valueLabel":{}},"type":"object"},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"minimum":0,"type":"integer"},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"detail":{},"label":{},"time":{},"tone":{}},"type":"object"},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"additionalProperties":false,"properties":{"description":{},"label":{},"recommended":{},"tone":{}},"type":"object"},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"additionalProperties":false,"properties":{"avatar":{},"avatarUrl":{},"entityRef":{},"name":{},"organization":{},"role":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"additionalProperties":false,"properties":{"href":{},"id":{},"sourceRefId":{},"title":{},"type":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"sidebar":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"maxLength":240,"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"additionalProperties":false,"properties":{"label":{},"tone":{},"value":{}},"type":"object"},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"label":{},"meta":{},"state":{}},"type":"object"},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"maxLength":60,"minLength":1,"type":"string"},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"items":{"anyOf":[{},{"type":"null"}]},"type":"array"},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"label":{},"tooltip":{},"value":{},"valueLabel":{}},"type":"object"},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"minimum":0,"type":"integer"},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"detail":{},"label":{},"time":{},"tone":{}},"type":"object"},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"additionalProperties":false,"properties":{"description":{},"label":{},"recommended":{},"tone":{}},"type":"object"},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"additionalProperties":false,"properties":{"avatar":{},"avatarUrl":{},"entityRef":{},"name":{},"organization":{},"role":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"additionalProperties":false,"properties":{"href":{},"id":{},"sourceRefId":{},"title":{},"type":{}},"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"additionalProperties":false,"properties":{"label":{},"tone":{}},"type":"object"},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"title":{}},"required":["main","sidebar"],"type":"object"},"list":{"additionalProperties":false,"properties":{"elements":{"additionalProperties":{"anyOf":[{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"direction":{"default":"vertical","enum":["horizontal","vertical"],"type":"string"},"gap":{"default":"md","enum":["lg","md","sm","xs"],"type":"string"},"wrap":{"default":false,"type":"boolean"}},"type":"object"},"type":{"const":"Stack"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"subtitle":{"maxLength":220,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"type":{"const":"Section"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"text":{"maxLength":1200,"minLength":1,"type":"string"},"variant":{"default":"body","enum":["body","caption","emphasis","muted"],"type":"string"}},"required":["text"],"type":"object"},"type":{"const":"Text"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"description":"each item string must be ≤ 240 characters. Split longer bullet points into two shorter items","items":{"maxLength":240,"minLength":1,"type":"string"},"maxItems":8,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Bullets"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"minLength":1,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"quote":{"maxLength":700,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceLabel":{"default":"View in Topic","maxLength":80,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"}},"required":["author","quote"],"type":"object"},"type":{"const":"Quote"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"avatars":{"default":[],"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"Attribution"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"tags":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":48,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["label"],"type":"object"},"maxItems":12,"minItems":1,"type":"array"}},"required":["tags"],"type":"object"},"type":{"const":"TagCloud"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"metrics":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":80,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"maxItems":4,"minItems":1,"type":"array"}},"required":["metrics"],"type":"object"},"type":{"const":"MetricStrip"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":80,"minLength":1,"type":"string"},"meta":{"maxLength":80,"minLength":1,"type":"string"},"state":{"default":"done","enum":["current","done","upcoming"],"type":"string"}},"required":["label"],"type":"object"},"maxItems":6,"minItems":2,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Milestones"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"columns":{"items":{"maxLength":60,"minLength":1,"type":"string"},"maxItems":4,"minItems":2,"type":"array"},"rows":{"items":{"items":{"maxLength":120,"type":"string"},"type":"array"},"maxItems":10,"minItems":1,"type":"array"}},"required":["columns","rows"],"type":"object"},"type":{"const":"Table"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":80,"minLength":1,"type":"string"},"tooltip":{"maxLength":160,"minLength":1,"type":"string"},"value":{"minimum":0,"type":"number"},"valueLabel":{"maxLength":80,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"maxItems":25,"minItems":1,"type":"array"},"kind":{"default":"line","enum":["bar","line"],"type":"string"},"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"valueLabel":{"maxLength":48,"minLength":1,"type":"string"}},"required":["data"],"type":"object"},"type":{"const":"Chart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"summary":{"maxLength":240,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"totalLabel":{"maxLength":80,"minLength":1,"type":"string"},"weeklyActivity":{"items":{"minimum":0,"type":"integer"},"maxItems":25,"minItems":1,"type":"array"}},"required":["weeklyActivity"],"type":"object"},"type":{"const":"ActivityChart"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"detail":{"maxLength":280,"minLength":1,"type":"string"},"label":{"maxLength":120,"minLength":1,"type":"string"},"time":{"maxLength":80,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["detail","label"],"type":"object"},"maxItems":6,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"type":{"const":"Timeline"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"body":{"maxLength":700,"minLength":1,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"tone":{"default":"info","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["body","title"],"type":"object"},"type":{"const":"Callout"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"actionLabel":{"default":"Hand Ticket to Agent","maxLength":80,"minLength":1,"type":"string"},"actions":{"items":{"additionalProperties":false,"properties":{"description":{"maxLength":240,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"recommended":{"type":"boolean"},"tone":{"default":"secondary","enum":["primary","secondary"],"type":"string"}},"required":["label"],"type":"object"},"maxItems":4,"type":"array"},"body":{"maxLength":900,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"type":{"const":"Recommendation"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"people":{"items":{"additionalProperties":false,"properties":{"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"entityRef":{"additionalProperties":false,"properties":{"id":{},"type":{}},"type":"object"},"name":{"maxLength":120,"minLength":1,"type":"string"},"organization":{"maxLength":120,"type":"string"},"role":{"maxLength":160,"type":"string"}},"required":["name"],"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["people"],"type":"object"},"type":{"const":"PeopleList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"topics":{"items":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"id":{"maxLength":160,"minLength":1,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"title":{"maxLength":180,"minLength":1,"type":"string"},"type":{"default":"idea","enum":["bug","idea","praise","question","risk"],"type":"string"}},"required":["title"],"type":"object"},"maxItems":8,"minItems":1,"type":"array"}},"required":["topics"],"type":"object"},"type":{"const":"TopicList"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"href":{"maxLength":240,"type":"string"},"hrefLabel":{"maxLength":80,"type":"string"},"label":{"maxLength":80,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"},"value":{"maxLength":240,"minLength":1,"type":"string"}},"required":["label","value"],"type":"object"},"type":{"const":"StatusBlock"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"properties":{"author":{"maxLength":120,"type":"string"},"avatar":{"maxLength":4,"minLength":1,"type":"string"},"avatarUrl":{"format":"uri","type":"string"},"avatars":{"items":{"maxLength":4,"minLength":1,"type":"string"},"maxItems":4,"type":"array"},"entityRef":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"type":{"enum":["author","person"],"type":"string"}},"required":["id","type"],"type":"object"},"hrefSlug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"quote":{"maxLength":700,"type":"string"},"reportedBy":{"maxLength":160,"minLength":1,"type":"string"},"reportedMeta":{"maxLength":160,"minLength":1,"type":"string"},"sourceHref":{"maxLength":240,"type":"string"},"sourceRefId":{"maxLength":160,"minLength":1,"type":"string"},"summary":{},"tags":{"default":[],"items":{"additionalProperties":false,"properties":{"label":{"maxLength":48,"minLength":1,"type":"string"},"tone":{"default":"neutral","enum":["calm","error","info","neutral","success","warning"],"type":"string"}},"required":["label"],"type":"object"},"maxItems":8,"type":"array"},"title":{}},"required":["reportedBy","reportedMeta"],"type":"object"},"type":{"const":"StoryListItem"}},"required":["props","type"],"type":"object"},{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"maxItems":24,"type":"array"},"props":{"additionalProperties":false,"type":"object"},"type":{"const":"Divider"}},"required":["props","type"],"type":"object"}]},"propertyNames":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"type":"object"},"root":{"maxLength":80,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"}},"required":["elements","root"],"type":"object"},"slug":{"maxLength":120,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"sourceRefs":{"default":[],"items":{"additionalProperties":false,"properties":{"id":{"maxLength":160,"minLength":1,"type":"string"},"label":{"maxLength":180,"minLength":1,"type":"string"},"type":{"enum":["author","company","email","intercom","issue","message","person","slack","topic"],"type":"string"}},"required":["id","type"],"type":"object"},"maxItems":24,"type":"array"},"summary":{},"title":{},"version":{"const":1}},"required":["detail","list","slug","version"],"type":"object"},"relevantMembers":{"items":{"properties":{"linkedAuthorIds":{"items":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"type":"array"},"memberId":{"anyOf":[{"type":"string"},{"type":"string"}]},"relevanceKind":{"enum":["action","awareness","ownership"],"type":"string"},"relevanceLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevanceRationale":{"type":"string"},"user":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},{"type":"null"}]},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"}},"required":["linkedAuthorIds","memberId","relevanceKind","relevanceLabel","relevanceRationale","user"],"type":"object"},"type":"array"}},"required":["archive","draft","relevantMembers"],"type":"object"}},"required":["story"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get story","tags":["Stories"]}},"/topics":{"get":{"description":"List topics (issues) with filters, message counts, and authors. When embeddingSearch is provided, performs semantic search using vector similarity instead of keyword search. Semantic search finds topics by meaning, useful for queries like \"users having trouble with authentication\".","operationId":"topics.list","parameters":[{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"view","required":false,"schema":{"description":"Topics source pipeline. 'v2' serves rows from the v2 ingest pipeline (v2_topics), honored only when the organization's v2-topics-view flag is on; without it the parameter is ignored and v1 is served. Under v2-topics-cutover omitted view defaults to v2, while explicit 'v1' serves the legacy topics list for internal comparison. Omitted or 'v1' otherwise serves v1.","enum":["v1","v2"],"title":"View","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"search","required":false,"schema":{"description":"Keyword search on title (max 100 chars). Wrap in double-quotes for exact token matching (e.g. \"persona\" matches the whole word and excludes \"personal\"). Ignored if embeddingSearch is provided.","maxLength":100,"title":"Search","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"embeddingSearch","required":false,"schema":{"description":"Semantic search query using vector similarity. When provided, finds topics by meaning instead of keywords. Overrides the search parameter.","maxLength":1000,"minLength":1,"title":"Embedding Search","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"minSimilarity","required":false,"schema":{"default":0.7,"description":"Minimum cosine similarity threshold for embeddingSearch (0-1, higher = more similar). Default 0.7.","maximum":1,"minimum":0,"title":"Minimum Similarity","type":"number"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"categories","required":false,"schema":{"description":"Filter topics by keywords/categories (OR logic: topic must have ANY of the listed categories). Case-insensitive. For v2 topics a category is a catalog keyword slug (see topics.filterOptions), matched through the topic's open keyword attribution.","items":{"type":"string"},"title":"Categories","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeCategories","required":false,"schema":{"description":"Exclude topics by keywords/categories (OR logic: topic must have NONE of the listed categories). Case-insensitive. For v2 topics a category is a catalog keyword slug.","items":{"type":"string"},"title":"Exclude Categories","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"issueTypes","required":false,"schema":{"items":{"enum":["bug_report","complaint","discussion","feature_request","praise"],"type":"string"},"type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeIssueTypes","required":false,"schema":{"items":{"enum":["bug_report","complaint","discussion","feature_request","praise"],"type":"string"},"type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"sources","required":false,"schema":{"description":"Filter topics by message sources (OR logic: topic must have messages from ANY listed source). Case-insensitive; duplicates are ignored.","items":{"type":"string"},"minItems":1,"title":"Sources","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeSources","required":false,"schema":{"description":"Exclude topics by message sources (OR logic: topic must have NO messages from ANY listed source). Case-insensitive; duplicates are ignored.","items":{"type":"string"},"minItems":1,"title":"Exclude Sources","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"dateRange","required":false,"schema":{"description":"Filter topics by time range overlap","properties":{"end":{"format":"date-time","type":"string"},"start":{"format":"date-time","type":"string"}},"required":["end","start"],"title":"Date range","type":"object"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortBy","required":false,"schema":{"default":"date","description":"Sort order. 'groups' sorts by the number of groups. Use 'similarity' with embeddingSearch for best results.","enum":["date","groups","lifecycle","priority","similarity"],"title":"Sort By","type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"sortOrder","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"priorities","required":false,"schema":{"items":{"description":"Priority level: very_low, low, default, high, or very_high","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludePriorities","required":false,"schema":{"items":{"description":"Priority level: very_low, low, default, high, or very_high","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"lifecycleStates","required":false,"schema":{"description":"Filter topics by lifecycle state. \"unknown\" also matches topics with no lifecycle assessment.","items":{"description":"LLM-assessed lifecycle state for a topic.","enum":["completed","dismissed","in_progress","open","unknown"],"title":"Topic Lifecycle State","type":"string"},"title":"Lifecycle States","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"companies","required":false,"schema":{"description":"Filter topics by company IDs (OR logic: topic must have messages from people associated with ANY listed company).","items":{"type":"string"},"title":"Companies","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeCompanies","required":false,"schema":{"description":"Exclude topics by company IDs (OR logic: topic must have NO messages from people associated with ANY listed company).","items":{"type":"string"},"title":"Exclude Companies","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"products","required":false,"schema":{"description":"Filter topics by product IDs (OR logic: topic must have messages in a channel mapped to ANY listed product). Pass \"none\" to also match topics with no product attribution at all.","items":{"anyOf":[{"format":"uuid","type":"string"},{"const":"none"}]},"title":"Products","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeProducts","required":false,"schema":{"description":"Exclude topics by product IDs (OR logic: topic must have NO messages in a channel mapped to ANY listed product). Pass \"none\" to exclude topics with no product attribution at all.","items":{"anyOf":[{"format":"uuid","type":"string"},{"const":"none"}]},"title":"Exclude Products","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"sourceContainers","required":false,"schema":{"description":"Filter topics by source container IDs (OR logic: topic must draw evidence from ANY listed container). v2 only.","items":{"format":"uuid","type":"string"},"minItems":1,"title":"Source Containers","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeSourceContainers","required":false,"schema":{"description":"Exclude topics by source container IDs (OR logic: topic must draw evidence from NONE of the listed containers). v2 only.","items":{"format":"uuid","type":"string"},"minItems":1,"title":"Exclude Source Containers","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"persons","required":false,"schema":{"description":"Filter topics by person IDs (OR logic: topic must have messages from ANY listed person).","items":{"type":"string"},"title":"Persons","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludePersons","required":false,"schema":{"description":"Exclude topics by person IDs (OR logic: topic must have messages from NONE of the listed people).","items":{"type":"string"},"title":"Exclude Persons","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"ticketStatuses","required":false,"schema":{"description":"Filter by linked ticket presence. \"has_ticket\" = has any linked ticket, \"none\" = no linked ticket.","items":{"enum":["has_ticket","none"],"type":"string"},"title":"Ticket Statuses","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"excludeTicketStatuses","required":false,"schema":{"description":"Exclude by linked ticket presence. \"has_ticket\" excludes topics with tickets, \"none\" excludes topics without tickets.","items":{"enum":["has_ticket","none"],"type":"string"},"title":"Exclude Ticket Statuses","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"teamResponse","required":false,"schema":{"description":"Filter by team response status. \"not_responded\" = no team member replied, \"fully_responded\" = team replied in all groups, \"partially_responded\" = team replied in some groups.","items":{"enum":["fully_responded","not_responded","partially_responded"],"type":"string"},"title":"Team Response","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"page","required":false,"schema":{"default":1,"exclusiveMinimum":0,"type":"integer"}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":10,"exclusiveMinimum":0,"maximum":100,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"authors":{"items":{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},"type":"array"},"eventCount":{"description":"Number of events grouped under this topic.","title":"Event Count","type":"integer"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"issueType":{"anyOf":[{"description":"Classification for the topic as a type of issue.","enum":["bug_report","complaint","discussion","feature_request","praise"],"title":"Issue Type","type":"string"},{"type":"null"}],"description":"Optional issue classification for the topic.","title":"Issue Type"},"keywords":{"description":"Keywords associated with the topic.","items":{"type":"string"},"title":"Keywords","type":"array"},"lifecycleState":{"anyOf":[{"description":"LLM-assessed lifecycle state for a topic.","enum":["completed","dismissed","in_progress","open","unknown"],"title":"Topic Lifecycle State","type":"string"},{"type":"null"}],"description":"Most recent LLM-assessed lifecycle state for this topic.","title":"Lifecycle State"},"lifecycleStateConfidence":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}],"description":"Confidence for the most recent lifecycle assessment.","title":"Lifecycle State Confidence"},"linkedTicket":{"anyOf":[{"properties":{"displayName":{"type":"string"},"linkType":{"enum":["issue","project"],"type":"string"},"url":{"format":"uri","type":"string"}},"required":["displayName","linkType","url"],"type":"object"},{"type":"null"}]},"messageCount":{"type":"number"},"persons":{"items":{"properties":{"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"anyOf":[{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"isOrgCompany":{"type":"boolean"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["domain","id","isOrgCompany","logoUrl","name"],"type":"object"},{"type":"null"}]},"displayName":{"type":"string"},"id":{"type":"string"},"isBot":{"type":"boolean"},"isStaff":{"type":"boolean"}},"required":["avatarUrl","company","displayName","id","isBot","isStaff"],"type":"object"},"type":"array"},"priority":{"description":"Priority level: very_low, low, default, high, or very_high","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"similarity":{"description":"Cosine similarity score (0-1, higher = more similar). Only present when embeddingSearch is used.","title":"Similarity","type":"number"},"sources":{"items":{"type":"string"},"type":"array"},"staffResponseGroupCount":{"type":"number"},"summary":{"description":"Descriptive summary of the topic.","title":"Summary","type":"string"},"timeRangeEnd":{"description":"End of the time range covered by the topic.","title":"Time Range End"},"timeRangeStart":{"description":"Start of the time range covered by the topic.","title":"Time Range Start"},"title":{"description":"Short human-readable title of the topic.","title":"Title","type":"string"},"totalGroupCount":{"type":"number"},"updatedAt":{"description":"Timestamp when the topic was last updated.","format":"date-time","title":"Updated At","type":"string"}},"required":["authors","eventCount","id","issueType","keywords","lifecycleState","lifecycleStateConfidence","linkedTicket","messageCount","persons","priority","sources","staffResponseGroupCount","summary","title","totalGroupCount"],"type":"object"},"type":"array"},"limit":{"description":"The page size used for this response.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"The 1-based page number returned.","exclusiveMinimum":0,"type":"integer"},"totalCount":{"description":"Total number of items matching the query, across all pages.","minimum":0,"type":"integer"}},"required":["data","limit","page","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"List topics","tags":["Topics"]}},"/topics/bulk":{"patch":{"description":"Update multiple topics at once. Supports changing priority, archiving (archived=true), and unarchiving (archived=false). At least one field must be provided. Use this instead of calling the single update endpoint multiple times.","operationId":"topics.bulkUpdate","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"archived":{"description":"Set to true to archive topics, false to unarchive them.","title":"Archived","type":"boolean"},"archivedReason":{"description":"Optional reason for archiving. Only used when archived=true.","maxLength":4000,"title":"Archived Reason","type":"string"},"priority":{"description":"Update all topics to this priority. Valid values: very_low, low, default, high, very_high.","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"topicIds":{"items":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"maxItems":100,"minItems":1,"type":"array"}},"required":["topicIds"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"updatedCount":{"type":"number"},"updatedTopicIds":{"items":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"type":"array"}},"required":["updatedCount","updatedTopicIds"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Bulk update","tags":["Topics"]}},"/topics/merge":{"post":{"description":"Merge multiple source topics into a target topic. Source topics are archived and marked as merged. Group and event associations are copied to the target. Rejects if any source topic is already archived.","operationId":"topics.merge","parameters":[{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"sourceTopicIds":{"description":"IDs of topics to merge into the target. Must not include the target topic ID.","items":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"maxItems":50,"minItems":1,"title":"Source Topic IDs","type":"array"},"targetTopicId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}],"description":"ID of the topic to merge into. Must not be in the sourceTopicIds array.","title":"Target Topic ID"}},"required":["sourceTopicIds","targetTopicId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"mergedCount":{"description":"Number of topics that were merged into the target.","title":"Merged Count","type":"number"},"targetTopicId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}],"description":"ID of the topic that received the merged content.","title":"Target Topic ID"}},"required":["mergedCount","targetTopicId"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Merge topics","tags":["Topics"]}},"/topics/{topicId}":{"get":{"description":"Get a topic by ID","operationId":"topics.get","parameters":[{"in":"path","name":"topicId","required":true,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Detailed topic fields including archived status.","properties":{"archivedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the topic was archived.","title":"Archived At"},"archivedByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}],"description":"User who archived the topic.","title":"Archived By User ID"},"archivedReason":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"Optional reason for archiving.","title":"Archived Reason"},"createdAt":{"format":"date-time","type":"string"},"eventCount":{"description":"Number of events grouped under this topic.","title":"Event Count","type":"integer"},"graphStatus":{"description":"Graph-structural lifecycle: active (live), superseded (system-dissolved, terminal), archived (user-dismissed, retains members).","enum":["active","archived","superseded"],"title":"Graph Status","type":"string"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"issueType":{"anyOf":[{"description":"Classification for the topic as a type of issue.","enum":["bug_report","complaint","discussion","feature_request","praise"],"title":"Issue Type","type":"string"},{"type":"null"}],"description":"Optional issue classification for the topic.","title":"Issue Type"},"keywords":{"description":"Keywords associated with the topic.","items":{"type":"string"},"title":"Keywords","type":"array"},"lifecycleState":{"anyOf":[{"description":"LLM-assessed lifecycle state for a topic.","enum":["completed","dismissed","in_progress","open","unknown"],"title":"Topic Lifecycle State","type":"string"},{"type":"null"}],"description":"Most recent LLM-assessed lifecycle state for this topic.","title":"Lifecycle State"},"lifecycleStateConfidence":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}],"description":"Confidence for the most recent lifecycle assessment.","title":"Lifecycle State Confidence"},"priority":{"description":"Priority level: very_low, low, default, high, or very_high","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"priorityReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reasoning from the most recent automatic topic-priority scoring decision. Null when priority was manually overridden or never auto-scored.","title":"Priority Reasoning"},"successorTopic":{"anyOf":[{"properties":{"id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["id","title"],"type":"object"},{"type":"null"}],"description":"The topic that replaced a superseded v2 topic, when one can be resolved.","title":"Successor Topic"},"summary":{"description":"Descriptive summary of the topic.","title":"Summary","type":"string"},"supersededAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when a v2 topic was superseded; null unless graphStatus is superseded.","title":"Superseded At"},"timeRangeEnd":{},"timeRangeStart":{},"title":{"description":"Short human-readable title of the topic.","title":"Title","type":"string"},"updatedAt":{"description":"Timestamp when the topic was last updated.","format":"date-time","title":"Updated At","type":"string"}},"required":["archivedByUserId","archivedReason","eventCount","id","issueType","keywords","lifecycleState","lifecycleStateConfidence","priority","priorityReasoning","summary","title"],"title":"Topic Detail","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get topic","tags":["Topics"]},"patch":{"description":"Update a single topic. Supports changing priority, lifecycle state, issue type, keywords, archiving (archived=true), and unarchiving (archived=false). At least one field must be provided.","operationId":"topics.update","parameters":[{"in":"path","name":"topicId","required":true,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]}},{"description":"Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"archived":{"description":"Set to true to archive the topic, false to unarchive it.","title":"Archived","type":"boolean"},"archivedReason":{"description":"Optional reason for archiving. Only used when archived=true.","maxLength":4000,"title":"Archived Reason","type":"string"},"issueType":{"anyOf":[{"description":"Classification for the topic as a type of issue.","enum":["bug_report","complaint","discussion","feature_request","praise"],"title":"Issue Type","type":"string"},{"type":"null"}],"description":"Update the topic issue type classification. Valid values: bug_report, feature_request, complaint, praise, or null to clear.","title":"Issue Type"},"keywords":{"description":"Replace the topic keywords/categories. Provide the full list of keywords.","items":{"maxLength":50,"minLength":1,"type":"string"},"maxItems":20,"title":"Keywords","type":"array"},"lifecycleState":{"description":"Update the topic lifecycle state. Valid values: open, in_progress, completed, dismissed. The unknown state is AI-assessed and cannot be set directly.","enum":["completed","dismissed","in_progress","open"],"title":"Lifecycle State","type":"string"},"priority":{"description":"Update the topic priority. Valid values: very_low, low, default, high, very_high.","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Detailed topic fields including archived status.","properties":{"archivedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the topic was archived.","title":"Archived At"},"archivedByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}],"description":"User who archived the topic.","title":"Archived By User ID"},"archivedReason":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"Optional reason for archiving.","title":"Archived Reason"},"createdAt":{"format":"date-time","type":"string"},"eventCount":{"description":"Number of events grouped under this topic.","title":"Event Count","type":"integer"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"issueType":{"anyOf":[{"description":"Classification for the topic as a type of issue.","enum":["bug_report","complaint","discussion","feature_request","praise"],"title":"Issue Type","type":"string"},{"type":"null"}],"description":"Optional issue classification for the topic.","title":"Issue Type"},"keywords":{"description":"Keywords associated with the topic.","items":{"type":"string"},"title":"Keywords","type":"array"},"lifecycleState":{"anyOf":[{"description":"LLM-assessed lifecycle state for a topic.","enum":["completed","dismissed","in_progress","open","unknown"],"title":"Topic Lifecycle State","type":"string"},{"type":"null"}],"description":"Most recent LLM-assessed lifecycle state for this topic.","title":"Lifecycle State"},"lifecycleStateConfidence":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}],"description":"Confidence for the most recent lifecycle assessment.","title":"Lifecycle State Confidence"},"priority":{"description":"Priority level: very_low, low, default, high, or very_high","enum":["default","high","low","very_high","very_low"],"title":"Priority","type":"string"},"priorityReasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reasoning from the most recent automatic topic-priority scoring decision. Null when priority was manually overridden or never auto-scored.","title":"Priority Reasoning"},"summary":{"description":"Descriptive summary of the topic.","title":"Summary","type":"string"},"timeRangeEnd":{},"timeRangeStart":{},"title":{"description":"Short human-readable title of the topic.","title":"Title","type":"string"},"updatedAt":{"description":"Timestamp when the topic was last updated.","format":"date-time","title":"Updated At","type":"string"}},"required":["archivedByUserId","archivedReason","eventCount","id","issueType","keywords","lifecycleState","lifecycleStateConfidence","priority","priorityReasoning","summary","title"],"title":"Topic Detail","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request conflicts with an existing resource or idempotency operation."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Update topic","tags":["Topics"]}},"/topics/{topicId}/groups":{"get":{"description":"Get all groups for a topic","operationId":"topics.getGroups","parameters":[{"in":"path","name":"topicId","required":true,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]}},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"order","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"group":{"properties":{"archivedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the group was archived.","title":"Archived At"},"endTimestamp":{"description":"Timestamp for the end of the group time range.","title":"End Timestamp"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"similarityAtAssignment":{"type":"number"},"startTimestamp":{"description":"Timestamp for the start of the group time range.","title":"Start Timestamp"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable title from the group AI metadata, when available.","title":"Group Title"}},"required":["id","title"],"type":"object"},"messages":{"items":{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]},"channel":{"anyOf":[{"properties":{"channelName":{"type":"string"},"id":{"type":"string"},"serverName":{"type":"string"}},"required":["channelName","id","serverName"],"type":"object"},{"type":"null"}]},"quoteHighlights":{"items":{"properties":{"confidence":{"maximum":1,"minimum":0,"type":"number"},"content":{"type":"string"}},"required":["confidence","content"],"type":"object"},"type":"array"},"reactions":{"items":{"properties":{"count":{"description":"Number of times this reaction was used.","exclusiveMinimum":0,"title":"Count","type":"integer"},"identifier":{"description":"Normalized reaction identifier (e.g., \"thumbsup\", \"heart\").","title":"Identifier","type":"string"},"messageId":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}],"description":"ID of the message this reaction belongs to.","title":"Message ID"},"unicode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unicode representation of the emoji if applicable.","title":"Unicode"}},"required":["count","identifier","messageId","unicode"],"type":"object"},"type":"array"},"replyTo":{"anyOf":[{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]}},"required":["author"],"type":"object"}]},{"type":"null"}]},"thread":{"anyOf":[{"allOf":[{"properties":{"content":{"description":"Full text content of the message.","title":"Content","type":"string"},"createdAt":{"description":"Timestamp when the message was created.","format":"date-time","title":"Created At","type":"string"},"deletedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was deleted, if applicable.","title":"Deleted At"},"editedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the message was last edited.","title":"Edited At"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isInternal":{"description":"Whether the message is an internal, team-only note withheld from the external/customer party (e.g. an internal agent note).","title":"Is Internal","type":"boolean"},"metadata":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}],"description":"Additional metadata captured for the message.","title":"Metadata"},"replyToId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal message ID that this message replies to.","title":"Reply To ID"},"sourceMessageId":{"description":"Identifier of the message in the source system.","title":"Source Message ID","type":"string"},"sourceMessageType":{"description":"Type/classification of the source message.","title":"Source Message Type","type":"string"},"sourceName":{"description":"Source system the message was ingested from.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"},"sourceReplyToId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source system ID of the message being replied to.","title":"Source Reply To ID"},"sourceThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Thread identifier in the source system.","title":"Source Thread ID"},"sourceUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"URL linking to the original message when available.","title":"Source URL"},"threadId":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Internal thread identifier when applicable.","title":"Thread ID"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional title of the message.","title":"Title"}},"required":["content","id","isInternal","metadata","replyToId","sourceMessageId","sourceMessageType","sourceName","sourceReplyToId","sourceThreadId","sourceUrl","threadId","title"],"type":"object"},{"properties":{"author":{"anyOf":[{"properties":{"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display name for the author.","title":"Display Name"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"isBot":{"description":"Whether the author is a bot account.","title":"Is Bot","type":"boolean"},"sourceAuthorId":{"description":"Author identifier in the source system.","title":"Source Author ID","type":"string"},"sourceAvatarUrl":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}],"description":"Avatar image URL from the source system.","title":"Source Avatar URL"},"sourceName":{"description":"Source system where the author originates.","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Source Name","type":"string"}},"required":["displayName","id","isBot","sourceAuthorId","sourceAvatarUrl","sourceName"],"type":"object"},{"type":"null"}]}},"required":["author"],"type":"object"}]},{"type":"null"}]}},"required":["author","channel","reactions","replyTo","thread"],"type":"object"}]},"type":"array"}},"required":["group","messages"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get groups","tags":["Topics"]}},"/topics/{topicId}/history":{"get":{"description":"Get change history for a topic. Returns audit trail of modifications with user attribution.","operationId":"topics.getHistory","parameters":[{"in":"path","name":"topicId","required":true,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]}},{"allowEmptyValue":true,"allowReserved":true,"explode":true,"in":"query","name":"changedByFilter","required":false,"schema":{"description":"Filter by actor type. Defaults to user and agent changes (excludes system).","items":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"title":"Changed By Filter","type":"array"},"style":"deepObject"},{"allowEmptyValue":true,"allowReserved":true,"in":"query","name":"limit","required":false,"schema":{"default":20,"description":"Maximum number of history records to return (default 20, max 50).","exclusiveMinimum":0,"maximum":50,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"actions":{"items":{"properties":{"actionAt":{"format":"date-time","type":"string"},"actionType":{"description":"Semantic category of the action taken: started (a discrete unit of work was initiated, e.g. a PR was opened — per-artifact, not a topic-level state), merged (a code change was integrated into a canonical branch — NOT the same as deployed/shipped/released), resolved (a tracked task was completed positively, e.g. issue closed as completed), dismissed (a task was closed as wontfix / not pursued). User-initiated rows (created via dashboard, agent MCP tool, or direct API call) use the same enum values as auto rows — origin is encoded in metadata.source.","enum":["dismissed","merged","resolved","started"],"title":"Topic Action Type","type":"string"},"createdByUser":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]},"externalLink":{"anyOf":[{"properties":{"authorLogin":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"draft":{"type":"boolean"},"linkType":{"const":"github_pull_request"},"merged":{"type":"boolean"},"number":{"type":"integer"},"state":{"enum":["closed","open"],"type":"string"},"title":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["authorLogin","draft","linkType","merged","number","state","title","url"],"type":"object"},{"properties":{"linkType":{"const":"github_issue"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["linkType","number","title","url"],"type":"object"},{"properties":{"linkType":{"const":"none"}},"required":["linkType"],"type":"object"}]},"id":{"description":"Unique identifier for the action record.","format":"uuid","title":"Action ID","type":"string"},"metadata":{},"note":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actionType","createdByUser","externalLink","id","note"],"type":"object"},"type":"array"},"history":{"items":{"properties":{"changedAt":{"format":"date-time","type":"string"},"changedBy":{"description":"Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).","enum":["agent","system","user"],"title":"Changed By Type","type":"string"},"changes":{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},"id":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]},"operation":{"description":"Type of database operation that triggered the history record.","enum":["DELETE","INSERT","UPDATE"],"title":"Topic History Operation","type":"string"},"previousValues":{"anyOf":[{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["changedBy","changes","id","operation","previousValues","user"],"type":"object"},"type":"array"},"mergedInto":{"anyOf":[{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"targetTopic":{"anyOf":[{"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"type":"object"},{"type":"null"}]},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","targetTopic","user"],"type":"object"},{"type":"null"}]},"merges":{"items":{"properties":{"id":{"type":"string"},"mergedAt":{"format":"date-time","type":"string"},"sourceTopics":{"items":{"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"type":"object"},"type":"array"},"user":{"anyOf":[{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"string"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional URL to the user avatar image.","title":"Image"},"name":{"description":"Human-readable name of the user.","title":"Name","type":"string"}},"required":["id","image","name"],"type":"object"},{"type":"null"}]}},"required":["id","sourceTopics","user"],"type":"object"},"type":"array"},"totalCount":{"type":"number"}},"required":["actions","history","mergedInto","merges","totalCount"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get history","tags":["Topics"]}},"/topics/{topicId}/people":{"get":{"description":"Get unique persons participating in a v1 or v2 topic, based on message authors linked via PersonIdentity","operationId":"topics.getTopicPersons","parameters":[{"in":"path","name":"topicId","required":true,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"format":"uuid","type":"string"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"anyOf":[{"properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["domain","id","logoUrl","name"],"type":"object"},{"type":"null"}]},"displayName":{"type":"string"},"id":{"type":"string"},"identities":{"items":{"properties":{"platform":{"type":"string"},"platformId":{"type":"string"}},"required":["platform","platformId"],"type":"object"},"type":"array"},"isBot":{"type":"boolean"},"isVip":{"type":"boolean"},"messageCount":{"type":"number"},"sources":{"items":{"type":"string"},"type":"array"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["avatarUrl","company","displayName","id","identities","isBot","isVip","messageCount","sources","title"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get topic persons","tags":["Topics","People"]}},"/whoami":{"get":{"description":"Return the organization behind the current request. Never returns anything about the credential itself.","operationId":"whoami.get","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"organization":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"type":"object"}},"required":["organization"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request (validation failed)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key does not have access to this resource."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error."}},"summary":"Get current identity","tags":["Whoami"]}}},"security":[{"bearerAuth":[]}],"servers":[{"description":"Production","url":"https://api.modem.dev/v1"}]}