{"openapi":"3.0.0","info":{"title":"distribute.you API","description":"API Gateway for distribute.you.\n\n## Quick Start\n\n1. Create an API key in the distribute.you dashboard, or via `POST /v1/api-keys`\n2. Use it as a Bearer token — that's it, no extra headers needed\n\n```\nAuthorization: Bearer distrib.usr_abc123...\n```\n\nYour key carries your org and user identity. All endpoints work out of the box.\n\n## Storing provider keys (BYOK)\n\nTo store your own provider API keys (e.g. OpenAI, Anthropic) for use in workflows:\n\n```\nPOST /v1/keys\nAuthorization: Bearer distrib.usr_abc123...\n\n{ \"provider\": \"openai\", \"apiKey\": \"sk-...\" }\n```\n\n## Error codes\n\n| Code | Meaning |\n|------|---------|\n| 401 | Missing or invalid Bearer token |\n| 400 | Organization context required (missing `x-org-id` — app key only) |\n| 429 | Rate limit exceeded — see below |\n| 502 | Identity resolution failed (internal service unreachable) |\n\n## Rate limits\n\nEvery response carries your current rate-limit state, so you never have to guess\nhow fast you may go:\n\n```\nRateLimit: limit=600, remaining=597, reset=42\nRateLimit-Policy: \"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60\nRateLimit-Limit: 600\nRateLimit-Remaining: 597\nRateLimit-Reset: 42\n```\n\n`reset` is **seconds until the current window rolls over**, not a timestamp.\n\n| Policy | Applies to | Budget |\n|--------|-----------|--------|\n| `authenticated` | One API key (`Authorization: Bearer distrib.*`) | 600 requests / 60s |\n| `anonymous` | One client IP, for endpoints that need no key | 120 requests / 60s |\n\nExceeding a budget returns **429** with a `Retry-After` header in seconds. Wait\nthat long and retry — the window is fixed, so a single wait clears it. Requests\nmade while throttled still count, so back off rather than polling the 429.\n\n## Deprecation policy\n\nNothing in this document is deprecated today. When something is, you learn it\nmechanically, from the API itself, and with at least\n**180 days** of notice:\n\n- The operation is marked `deprecated: true` in this document.\n- Every response it returns carries `Deprecation: @<unix-seconds>` (RFC 9745)\n  and `Sunset: <HTTP-date>` (RFC 8594). `Sunset` is the earliest date the\n  operation may stop working — never sooner than 180 days\n  after `Deprecation`.\n- A `Link: <url>; rel=\"deprecation\"` header points at the replacement\n  operation or the changelog entry.\n- A deprecated operation keeps working until its sunset date. Deprecation is an\n  announcement, not a removal.\n- Removal happens only behind a new URL version prefix. `/v1` never changes\n  meaning underneath a caller: a breaking change ships as `/v2`.\n\nThe same policy is machine-readable at the root of this document under\n`x-deprecation-policy`.\n","version":"1.0.0"},"servers":[{"url":"https://api.distribute.you"}],"tags":[{"name":"Health","description":"Health check and debug endpoints"},{"name":"Authentication","description":"Create and manage your API keys"},{"name":"Keys","description":"Provider key management"},{"name":"Public Costs","description":"Public costs/pricing endpoints (no auth, used by landing pages)"},{"name":"User","description":"Current user information"},{"name":"Campaigns","description":"Campaign management"},{"name":"Leads","description":"Lead search"},{"name":"Qualify","description":"Email reply qualification"},{"name":"Brand","description":"Brand management"},{"name":"Scraping","description":"URL scraping via scraping-service"},{"name":"Activity","description":"User activity tracking"},{"name":"Chat","description":"AI chat with SSE streaming"},{"name":"Billing","description":"Billing, credits, and checkout"},{"name":"Platform","description":"Service discovery"},{"name":"CRM Contacts","description":"Client B2C CRM CSV contact ingestion (crm-service proxy)"},{"name":"Expert Quotes","description":"Expert quote outreach (journalists-quotes-service proxy)"},{"name":"AI Visibility","description":"AI visibility-score audits (ai-visibility-score-service proxy)"},{"name":"Invites","description":"Invite-only gate (Wave 0.5): validate codes, query org quota, claim rewards"},{"name":"Waitlist","description":"Waitlist for users without an invite code"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication.\n\nUse an API key (`distrib.usr_*`) as your Bearer token. Create one via `POST /v1/api-keys` or in the dashboard.\n\nYour key carries your org and user identity. No extra headers needed."}},"schemas":{"ApiInfoResponse":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"docs":{"type":"string"}},"required":["name","version","docs"]},"HealthResponse":{"type":"object","properties":{"status":{"type":"string"},"service":{"type":"string"},"version":{"type":"string"}},"required":["status","service","version"]},"OpenApiDocumentResponse":{"type":"object","properties":{}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},"InternalOpenApiDocumentResponse":{"type":"object","properties":{}},"RankedResponse":{"type":"object","properties":{}},"BestResponse":{"type":"object","properties":{}},"PublicFeatureRevenueResponse":{"type":"object","properties":{}},"PublicWorkflowEngagementLatencyResponse":{"type":"object","properties":{}},"PublicCostProjectionResponse":{"type":"object","properties":{}},"PublicCostPerOutcomeTrendResponse":{"type":"object","properties":{}},"PublicBestModelCostPerOutcomeTrendResponse":{"type":"object","properties":{}},"PublicWorkflowCostPerOutcomeResponse":{"type":"object","properties":{}},"PublicCostPerOutcomeLifetimeResponse":{"type":"object","properties":{}},"PublicCostPerOutcomeDistributionResponse":{"type":"object","properties":{}},"PublicChannelCatalogueResponse":{"type":"object","properties":{}},"PublicChannelFunnelEconomicsResponse":{"type":"object","properties":{}},"StaffSendForecastResponse":{"type":"object","properties":{}},"StaffAccountsResponse":{"type":"object","properties":{}},"StaffActiveUsersResponse":{"type":"object","properties":{}},"StaffActiveUsersByUserResponse":{"type":"object","properties":{}},"StaffCustomerSuccessResponse":{"type":"object","properties":{}},"StaffRevenueResponse":{"type":"object","properties":{}},"MeResponse":{"type":"object","properties":{"userId":{"type":"string"},"orgId":{"type":"string"},"authType":{"type":"string","enum":["user_key","admin"]}}},"Campaign":{"type":"object","properties":{"id":{"type":"string","description":"Campaign ID"},"orgId":{"type":"string","description":"Organization ID"},"createdByUserId":{"type":"string","nullable":true,"description":"User who created the campaign"},"name":{"type":"string","description":"Campaign name"},"workflowSlug":{"type":"string","description":"Exact versioned workflow slug used for execution"},"workflowDynastySlug":{"type":"string","nullable":true,"description":"Stable dynasty slug for the workflow lineage (unversioned)"},"brandUrls":{"type":"array","items":{"type":"string"},"description":"Brand website URLs (resolved from brandIds via brand-service)"},"brandIds":{"type":"array","items":{"type":"string"},"description":"Brand IDs"},"featureSlug":{"type":"string","nullable":true,"description":"Exact versioned feature slug for tracking"},"featureDynastySlug":{"type":"string","nullable":true,"description":"Stable dynasty slug for the feature lineage (unversioned)"},"featureInputs":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"Free-form JSONB inputs for the feature"},"maxBudgetDailyUsd":{"type":"string","nullable":true,"description":"Max daily budget in USD"},"maxBudgetWeeklyUsd":{"type":"string","nullable":true,"description":"Max weekly budget in USD"},"maxBudgetMonthlyUsd":{"type":"string","nullable":true,"description":"Max monthly budget in USD"},"maxBudgetTotalUsd":{"type":"string","nullable":true,"description":"Max total budget in USD"},"maxLeads":{"type":"number","nullable":true,"description":"Maximum number of leads"},"goal":{"type":"string","nullable":true,"enum":["signup","meetingBooked","purchase"],"description":"Campaign's own optimization goal"},"audienceIds":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Subset of the brand's audiences this campaign targets"},"servicesOffered":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Services offered by this campaign"},"clickDestinationUrl":{"type":"string","nullable":true,"description":"Campaign's click-destination URL"},"startDate":{"type":"string","nullable":true,"description":"Campaign start date"},"endDate":{"type":"string","nullable":true,"description":"Campaign end date"},"status":{"type":"string","description":"Campaign status (e.g. 'active', 'stopped')"},"nextRunAt":{"type":"string","nullable":true,"description":"Scheduled next run time for a gate-blocked campaign"},"notifyFrequency":{"type":"string","nullable":true,"description":"Notification frequency"},"notifyChannel":{"type":"string","nullable":true,"description":"Notification channel"},"notifyDestination":{"type":"string","nullable":true,"description":"Notification destination"},"createdAt":{"type":"string","description":"ISO timestamp"},"updatedAt":{"type":"string","description":"ISO timestamp"}},"required":["id","orgId","createdByUserId","name","workflowSlug","workflowDynastySlug","brandUrls","brandIds","featureSlug","featureDynastySlug","featureInputs","maxBudgetDailyUsd","maxBudgetWeeklyUsd","maxBudgetMonthlyUsd","maxBudgetTotalUsd","maxLeads","goal","audienceIds","servicesOffered","clickDestinationUrl","startDate","endDate","status","nextRunAt","notifyFrequency","notifyChannel","notifyDestination","createdAt","updatedAt"]},"CampaignListResponse":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}}},"required":["campaigns"]},"CreateCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/Campaign"}},"required":["campaign"]},"CreateCampaignRequest":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name"},"workflowSlug":{"type":"string","minLength":1,"description":"Exact versioned workflow slug (e.g. 'sales-email-cold-outreach-sienna-v3'). Use for pinning to a specific version. Provide this OR workflowDynastySlug."},"workflowDynastySlug":{"type":"string","minLength":1,"description":"Stable dynasty slug for the workflow lineage (e.g. 'sales-email-cold-outreach-sienna'). Campaign-service resolves to the latest version automatically. Preferred over workflowSlug for dashboard use."},"brandUrls":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Brand website URLs. First URL is the primary brand; additional URLs are secondary brands. Provide this (website path) OR brandIds (no-website path) — exactly one."},"brandIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Brand UUIDs of already-created brands (no-website path). First id is the primary brand. When provided, api-service skips the brandUrls→brand upsert and forwards these ids straight to campaign-service. Provide this OR brandUrls — exactly one."},"featureSlug":{"type":"string","minLength":1,"description":"Exact versioned feature slug. Use for pinning to a specific version. Provide this OR featureDynastySlug."},"featureDynastySlug":{"type":"string","minLength":1,"description":"Stable dynasty slug for the feature lineage (e.g. 'pr-cold-email-outreach'). Campaign-service resolves to the latest version automatically. Preferred over featureSlug for dashboard use."},"featureInputs":{"type":"object","additionalProperties":{"nullable":true},"description":"Opaque feature inputs. Validated by key-presence against features-service, never inspected by api-service."},"maxBudgetDailyUsd":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Max daily budget in USD"},"maxBudgetWeeklyUsd":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Max weekly budget in USD"},"maxBudgetMonthlyUsd":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Max monthly budget in USD"},"maxBudgetTotalUsd":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Max total budget in USD"},"maxLeads":{"type":"integer","description":"Maximum number of leads to contact"},"endDate":{"type":"string","description":"Campaign end date"},"goal":{"type":"string","nullable":true,"minLength":1,"description":"Campaign's own optimization goal. Vocabulary owned by campaign-service — not enumerated here."},"audienceIds":{"type":"array","nullable":true,"items":{"type":"string","minLength":1},"minItems":1,"description":"Subset of the brand's audiences this campaign targets"},"servicesOffered":{"type":"array","nullable":true,"items":{"type":"string","minLength":1},"description":"Services offered by this campaign"},"clickDestinationUrl":{"type":"string","nullable":true,"minLength":1,"description":"Campaign's click-destination URL"}},"required":["name","featureInputs"],"example":{"name":"Q2 SaaS Outreach","workflowDynastySlug":"sales-email-cold-outreach-sienna","brandUrls":["https://acme.com"],"featureDynastySlug":"pr-cold-email-outreach","featureInputs":{"targetAudience":"SaaS founders in the US","editorialAngle":"AI productivity tools"},"maxBudgetTotalUsd":"500"}},"GetCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/Campaign"}},"required":["campaign"]},"UpdateCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/Campaign"}},"required":["campaign"]},"SetBrandCampaignsDailyBudgetResponse":{"type":"object","properties":{}},"SetBrandCampaignsDailyBudgetRequest":{"type":"object","properties":{"dailyBudgetCents":{"type":"integer","nullable":true,"minimum":0,"description":"Daily budget in cents for every sales campaign of the brand; null clears each campaign's own budget"}},"required":["dailyBudgetCents"]},"StopCampaignResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/Campaign"}},"required":["campaign"]},"RunWithOwnCost":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Run ID"},"organizationId":{"type":"string","nullable":true,"format":"uuid"},"userId":{"type":"string","nullable":true,"format":"uuid"},"brandIds":{"type":"array","nullable":true,"items":{"type":"string"}},"campaignId":{"type":"string","nullable":true},"workflowSlug":{"type":"string","nullable":true},"featureSlug":{"type":"string","nullable":true},"serviceName":{"type":"string"},"taskName":{"type":"string"},"status":{"type":"string","description":"Run status (e.g. completed, failed)"},"parentRunId":{"type":"string","nullable":true,"format":"uuid"},"startedAt":{"type":"string","format":"date-time","description":"ISO timestamp when the run started"},"completedAt":{"type":"string","nullable":true,"format":"date-time","description":"ISO timestamp when the run completed"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ownCostInUsdCents":{"type":"string","description":"Sum of this run's own costs (excludes descendants)"},"ownActualCostInUsdCents":{"type":"string","description":"Sum of this run's own costs with status='actual'"},"ownProvisionedCostInUsdCents":{"type":"string","description":"Sum of this run's own costs with status='provisioned'"}},"required":["id","organizationId","userId","brandIds","campaignId","workflowSlug","featureSlug","serviceName","taskName","status","parentRunId","startedAt","completedAt","createdAt","updatedAt","ownCostInUsdCents","ownActualCostInUsdCents","ownProvisionedCostInUsdCents"]},"ListRunsResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/RunWithOwnCost"}},"offset":{"type":"number"},"limit":{"type":"number"}},"required":["runs","offset"]},"RepliesDetail":{"type":"object","properties":{"interested":{"type":"number"},"meetingBooked":{"type":"number"},"closed":{"type":"number"},"notInterested":{"type":"number"},"wrongPerson":{"type":"number"},"unsubscribe":{"type":"number"},"neutral":{"type":"number"},"autoReply":{"type":"number"},"outOfOffice":{"type":"number"}},"required":["interested","meetingBooked","closed","notInterested","wrongPerson","unsubscribe","neutral","autoReply","outOfOffice"]},"RecipientStats":{"type":"object","properties":{"contacted":{"type":"number","description":"Leads submitted to email provider (COUNT DISTINCT by lead)"},"sent":{"type":"number","description":"Recipients with at least one sent email"},"delivered":{"type":"number","description":"Recipients with at least one delivered email"},"opened":{"type":"number","description":"Recipients who opened at least one email"},"bounced":{"type":"number","description":"Recipients who bounced"},"clicked":{"type":"number","description":"Recipients who clicked"},"unsubscribed":{"type":"number","description":"Recipients who unsubscribed"},"repliesPositive":{"type":"number"},"repliesNegative":{"type":"number"},"repliesNeutral":{"type":"number"},"repliesAutoReply":{"type":"number"},"repliesDetail":{"$ref":"#/components/schemas/RepliesDetail"}},"required":["contacted","sent","delivered","opened","bounced","clicked","unsubscribed","repliesPositive","repliesNegative","repliesNeutral","repliesAutoReply","repliesDetail"]},"EmailStats":{"type":"object","properties":{"sent":{"type":"number","description":"Total emails sent (COUNT *)"},"delivered":{"type":"number","description":"Total emails delivered"},"opened":{"type":"number","description":"Total email opens"},"clicked":{"type":"number","description":"Total email clicks"},"bounced":{"type":"number","description":"Total emails bounced"},"unsubscribed":{"type":"number","description":"Total unsubscribes"},"stepStats":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}},"description":"Per-step breakdown"}},"required":["sent","delivered","opened","clicked","bounced","unsubscribed","stepStats"]},"CampaignStatsResponse":{"type":"object","properties":{"campaignId":{"type":"string"},"leadsServed":{"type":"number"},"leadsContacted":{"type":"number","description":"Count of unique leads that received at least one email"},"leadsBuffered":{"type":"number"},"leadsSkipped":{"type":"number"},"apollo":{"type":"object","properties":{"enrichedLeadsCount":{"type":"number"},"searchCount":{"type":"number"},"fetchedPeopleCount":{"type":"number"},"totalMatchingPeople":{"type":"number"}},"required":["enrichedLeadsCount","searchCount","fetchedPeopleCount","totalMatchingPeople"]},"emailsGenerated":{"type":"number"},"totalCostUsd":{"type":"number"},"recipientStats":{"$ref":"#/components/schemas/RecipientStats"},"emailStats":{"$ref":"#/components/schemas/EmailStats"},"totalCostInUsdCents":{"type":"string","nullable":true,"description":"Total cost from campaign-service budget tracking"},"costBreakdown":{"type":"array","items":{"type":"object","properties":{"costName":{"type":"string"},"totalCostInUsdCents":{"type":"string"},"actualCostInUsdCents":{"type":"string"},"provisionedCostInUsdCents":{"type":"string"},"totalQuantity":{"type":"string"}},"required":["costName","totalCostInUsdCents","actualCostInUsdCents","provisionedCostInUsdCents","totalQuantity"]},"description":"Per-cost-name breakdown from runs-service"}},"required":["campaignId","leadsServed","leadsContacted","leadsBuffered","leadsSkipped","emailsGenerated","recipientStats","emailStats"]},"CampaignsBatchStatsResponse":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string"},"leadsServed":{"type":"number"},"leadsContacted":{"type":"number","description":"Count of unique leads that received at least one email"},"leadsBuffered":{"type":"number"},"leadsSkipped":{"type":"number"},"emailsGenerated":{"type":"number"},"recipientStats":{"$ref":"#/components/schemas/RecipientStats"},"emailStats":{"$ref":"#/components/schemas/EmailStats"},"totalCostInUsdCents":{"type":"string","nullable":true},"runCount":{"type":"number"}},"required":["campaignId","leadsServed","leadsContacted","leadsBuffered","leadsSkipped","emailsGenerated","recipientStats","emailStats","totalCostInUsdCents","runCount"]}}},"required":["campaigns"]},"ErrorSummary":{"type":"object","properties":{"failedStep":{"type":"string","description":"Which DAG step failed (e.g. 'fetch_lead', 'generate_email')"},"message":{"type":"string","description":"Cleaned error message without stack traces"},"rootCause":{"type":"string","description":"User-friendly root cause (e.g. 'billing-service unavailable')"}},"required":["failedStep","message","rootCause"],"description":"Structured error summary for failed runs. Contains a user-friendly rootCause, the failedStep, and a cleaned message. Only present when status is 'failed'."},"RunCostData":{"type":"object","nullable":true,"properties":{"status":{"type":"string","description":"Run status (e.g. completed, failed)"},"startedAt":{"type":"string","nullable":true,"description":"ISO timestamp when the run started"},"completedAt":{"type":"string","nullable":true,"description":"ISO timestamp when the run completed"},"totalCostInUsdCents":{"type":"string","nullable":true,"description":"Total cost in USD cents"},"costs":{"type":"array","items":{"type":"object","properties":{"costName":{"type":"string"},"totalCostInUsdCents":{"type":"string"},"actualCostInUsdCents":{"type":"string"},"provisionedCostInUsdCents":{"type":"string"},"quantity":{"type":"number"}},"required":["costName","totalCostInUsdCents","actualCostInUsdCents","provisionedCostInUsdCents","quantity"]},"description":"Per-cost-name breakdown"},"serviceName":{"type":"string","nullable":true},"taskName":{"type":"string","nullable":true},"error":{"type":"string","description":"Raw error message (for debugging). Only present on failed runs."},"errorSummary":{"$ref":"#/components/schemas/ErrorSummary"},"descendantRuns":{"type":"array","items":{"nullable":true},"description":"Child runs"}},"required":["status","startedAt","completedAt","totalCostInUsdCents","costs","serviceName","taskName","descendantRuns"],"description":"Generation run cost data, null if no run"},"CampaignEmailsResponse":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Generation ID"},"campaignId":{"type":"string"},"subject":{"type":"string","nullable":true,"description":"Email subject line"},"bodyHtml":{"type":"string","nullable":true,"description":"Email body as HTML"},"bodyText":{"type":"string","nullable":true,"description":"Email body as plain text"},"sequence":{"type":"number","nullable":true,"description":"Sequence number in the campaign"},"leadFirstName":{"type":"string","nullable":true},"leadLastName":{"type":"string","nullable":true},"leadCompany":{"type":"string","nullable":true},"leadOrganizationDomain":{"type":"string","nullable":true,"description":"Company domain from lead enrichment"},"leadTitle":{"type":"string","nullable":true},"leadIndustry":{"type":"string","nullable":true},"clientCompanyName":{"type":"string","nullable":true},"generationRunId":{"type":"string","nullable":true},"createdAt":{"type":"string","description":"ISO timestamp"},"generationRun":{"$ref":"#/components/schemas/RunCostData"}},"required":["id","campaignId","subject","bodyHtml","bodyText","sequence","leadFirstName","leadLastName","leadCompany","leadOrganizationDomain","leadTitle","leadIndustry","clientCompanyName","generationRunId","createdAt","generationRun"]}}},"required":["emails"]},"OrgKeyItem":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name (e.g. openai, anthropic)"},"maskedKey":{"type":"string","description":"Masked API key value (e.g. sk-...abc)"},"createdAt":{"type":"string","nullable":true,"description":"ISO timestamp"},"updatedAt":{"type":"string","nullable":true,"description":"ISO timestamp"}},"required":["provider","maskedKey","createdAt","updatedAt"]},"ListKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/OrgKeyItem"}}},"required":["keys"]},"UpsertKeyResponse":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name"},"maskedKey":{"type":"string","description":"Masked key value"},"message":{"type":"string","description":"Confirmation message"}},"required":["provider","maskedKey","message"]},"UpsertKeyRequest":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name (e.g. openai, anthropic, stripe)"},"apiKey":{"type":"string","description":"The API key value"}},"required":["provider","apiKey"]},"DeleteKeyResponse":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message"}},"required":["message"]},"KeySourcePreference":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name"},"keySource":{"type":"string","enum":["org","platform"],"description":"Key source preference"}},"required":["provider","keySource"]},"ListKeySourcesResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/KeySourcePreference"}}},"required":["sources"]},"GetKeySourceResponse":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name"},"orgId":{"type":"string","description":"Organization ID"},"keySource":{"type":"string","enum":["org","platform"],"description":"Key source preference"},"isDefault":{"type":"boolean","description":"Whether this is the default (no explicit preference set)"}},"required":["provider","orgId","keySource","isDefault"]},"SetKeySourceResponse":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name"},"orgId":{"type":"string","description":"Organization ID"},"keySource":{"type":"string","enum":["org","platform"],"description":"Key source preference"},"message":{"type":"string","description":"Confirmation message"}},"required":["provider","orgId","keySource","message"]},"SetKeySourceRequest":{"type":"object","properties":{"keySource":{"type":"string","enum":["org","platform"],"description":"Whether to use the org's own key or the platform key"}},"required":["keySource"]},"ProviderRequirementsResponse":{"type":"object","properties":{"requirements":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","description":"Service name"},"method":{"type":"string","description":"HTTP method"},"path":{"type":"string","description":"Endpoint path"},"provider":{"type":"string","description":"Required provider"}},"required":["service","method","path","provider"]},"description":"Per-endpoint provider requirements"},"providers":{"type":"array","items":{"type":"string"},"description":"Unique list of all required providers"}},"required":["requirements","providers"]},"ProviderRequirementsRequest":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","minLength":1,"description":"Service name"},"method":{"type":"string","minLength":1,"description":"HTTP method"},"path":{"type":"string","minLength":1,"description":"Endpoint path"}},"required":["service","method","path"]},"minItems":1,"description":"List of service endpoints to check"}},"required":["endpoints"]},"ApiKeyItem":{"type":"object","properties":{"id":{"type":"string","description":"API key ID"},"keyPrefix":{"type":"string","description":"Key prefix for identification (e.g. distrib.usr_abc...)"},"name":{"type":"string","nullable":true,"description":"Human-readable name"},"orgId":{"type":"string","description":"Organization ID"},"userId":{"type":"string","description":"User ID"},"createdBy":{"type":"string","description":"Who created the key"},"createdAt":{"type":"string","nullable":true,"description":"ISO timestamp"},"lastUsedAt":{"type":"string","nullable":true,"description":"ISO timestamp of last usage"}},"required":["id","keyPrefix","name","orgId","userId","createdBy","createdAt","lastUsedAt"]},"ListApiKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyItem"}}},"required":["keys"]},"CreateApiKeyResponse":{"type":"object","properties":{"id":{"type":"string","description":"API key ID"},"key":{"type":"string","description":"Full API key value (only returned at creation)"},"name":{"type":"string","description":"Key name"},"orgId":{"type":"string","description":"Organization ID"},"userId":{"type":"string","description":"User ID"},"createdBy":{"type":"string","description":"Who created the key"},"createdAt":{"type":"string","nullable":true,"description":"ISO timestamp"}},"required":["id","key","name","orgId","userId","createdBy","createdAt"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable name for the API key"}},"required":["name"]},"RevokeApiKeyResponse":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message"}},"required":["message"]},"SessionApiKeyResponse":{"type":"object","properties":{"id":{"type":"string","description":"Key ID"},"key":{"type":"string","description":"Full API key value"},"keyPrefix":{"type":"string","description":"Key prefix for display"},"name":{"type":"string","nullable":true,"description":"Key name"}},"required":["id","key","keyPrefix","name"]},"LeadSearchResponse":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Person ID"},"first_name":{"type":"string","nullable":true,"description":"First name"},"last_name":{"type":"string","nullable":true,"description":"Last name"},"email":{"type":"string","nullable":true,"description":"Email address"},"title":{"type":"string","nullable":true,"description":"Job title"},"linkedin_url":{"type":"string","nullable":true,"description":"LinkedIn URL"},"organization":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"website_url":{"type":"string","nullable":true},"industry":{"type":"string","nullable":true},"estimated_num_employees":{"type":"number","nullable":true}},"required":["name","website_url","industry","estimated_num_employees"],"description":"Company info"}},"required":["id","first_name","last_name","email","title","linkedin_url","organization"]},"description":"Matching people"},"pagination":{"type":"object","properties":{"page":{"type":"number"},"per_page":{"type":"number"},"total_entries":{"type":"number"},"total_pages":{"type":"number"}},"required":["page","per_page","total_entries","total_pages"],"description":"Pagination info"}},"required":["people","pagination"]},"LeadSearchRequest":{"type":"object","properties":{"person_titles":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Job titles to search for"},"organization_locations":{"type":"array","items":{"type":"string"},"description":"Company locations filter"},"organization_industries":{"type":"array","items":{"type":"string"},"description":"Industry tag IDs filter"},"organization_num_employees_ranges":{"type":"array","items":{"type":"string"},"description":"Employee count ranges"},"per_page":{"type":"integer","maximum":100,"default":10,"description":"Results per page (max 100)"}},"required":["person_titles"]},"BrandLeadsResponse":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}},"description":"Array of LeadDetail objects from lead-service. Each item includes top-level fields (id, leadId, email, namespace, apolloPersonId, emailStatus, status, statusReason, statusDetails, parentRunId, runId, brandIds, campaignId, orgId, userId, workflowSlug, featureSlug, servedAt, contacted, sent, delivered, opened, clicked, bounced, unsubscribed, replied, replyClassification, lastDeliveredAt, global, audience: { id, name, avatarUrl } | null) plus a canonical `lead: FullLead | null` payload."}},"required":["leads"]},"LeadStatsResponse":{"type":"object","properties":{}},"LeadDetailResponse":{"type":"object","properties":{}},"LeadStepStatementsResponse":{"type":"object","properties":{}},"LeadStepStatementResponse":{"type":"object","properties":{}},"LeadStepStatementRequest":{"type":"object","properties":{}},"QualifyResponse":{"type":"object","properties":{"qualification":{"type":"string","description":"Classification (e.g. 'interested', 'not_interested', 'out_of_office', 'unsubscribe')"},"confidence":{"type":"number","description":"Confidence score 0-1"},"reasoning":{"type":"string","description":"AI reasoning for the classification"}},"required":["qualification"]},"QualifyRequest":{"type":"object","properties":{"sourceService":{"type":"string","default":"api","description":"Source service identifier"},"sourceOrgId":{"type":"string","description":"Organization ID (defaults to auth org)"},"sourceRefId":{"type":"string","description":"Reference ID in the source system"},"fromEmail":{"type":"string","minLength":1,"description":"Sender email address"},"toEmail":{"type":"string","minLength":1,"description":"Recipient email address"},"subject":{"type":"string","description":"Email subject line"},"bodyText":{"type":"string","description":"Plain text email body"},"bodyHtml":{"type":"string","description":"HTML email body"},"byokApiKey":{"type":"string","description":"BYOK API key for AI provider"}},"required":["fromEmail","toEmail"]},"ScrapeResponse":{"type":"object","properties":{}},"ScrapeRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"URL to scrape"},"skipCache":{"type":"boolean","description":"Skip cached results and force re-scrape"},"provider":{"type":"string","enum":["scrape-do","firecrawl"],"description":"Scraping provider (default: scrape-do)"}},"required":["url"]},"ScrapeByUrlResponse":{"type":"object","properties":{}},"BrandSummary":{"type":"object","properties":{}},"ListBrandsResponse":{"type":"object","properties":{"brands":{"type":"array","items":{"$ref":"#/components/schemas/BrandSummary"}}},"required":["brands"]},"BatchBrandsByIdsResponse":{"type":"object","properties":{}},"GetBrandResponse":{"type":"object","properties":{"brand":{"$ref":"#/components/schemas/BrandSummary"}},"required":["brand"]},"ExtractFieldsFromHeaderResponse":{"type":"object","properties":{}},"ExtractFieldRequest":{"type":"object","properties":{"key":{"type":"string","description":"Field key (e.g. 'industry', 'valueProposition')"},"description":{"type":"string","description":"Description of what to extract"}},"required":["key","description"]},"ExtractFieldsFromHeaderRequest":{"type":"object","properties":{"brandIds":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Brand UUIDs to extract fields for"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExtractFieldRequest"},"description":"Fields to extract"},"resetCache":{"type":"boolean","description":"When true, bypass all cache layers (URL maps, page scrapes, field extractions, consolidated fields) and force a full re-extraction"}},"required":["brandIds","fields"]},"ExtractedFieldsResponse":{"type":"object","properties":{}},"ExtractImagesMultiBrandResponse":{"type":"object","properties":{}},"ExtractImageCategory":{"type":"object","properties":{"key":{"type":"string","description":"Image category key (e.g. 'logo', 'product_shots', 'hero_image')"},"description":{"type":"string","description":"Description of what kind of image to extract"},"maxCount":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Maximum number of images to extract for this category"}},"required":["key","description","maxCount"]},"ExtractImagesFromHeaderRequest":{"type":"object","properties":{"brandIds":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Brand UUIDs to extract images for"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/ExtractImageCategory"},"description":"Image categories to extract"}},"required":["brandIds","categories"]},"ExtractedImagesResponse":{"type":"object","properties":{}},"UpsertBrandResponse":{"type":"object","properties":{}},"BrandUpsertRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Brand website URL (omit for a no-website brand)"},"name":{"type":"string","minLength":1,"description":"Brand name — identity source when no URL is provided"}}},"BrandRunsResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/RunCostData"}}},"required":["runs"]},"SalesEconomicsEffectiveResponse":{"type":"object","properties":{}},"SalesEconomicsResponse":{"type":"object","properties":{}},"SalesEconomicsRequest":{"type":"object","properties":{}},"SalesFunnelsResponse":{"type":"object","properties":{}},"SalesFunnelsSetRequest":{"type":"object","properties":{}},"SalesFunnelRequest":{"type":"object","properties":{}},"ClickDestinationResponse":{"type":"object","properties":{"clickDestinationUrl":{"type":"string"}},"required":["clickDestinationUrl"]},"ClickDestinationRequest":{"type":"object","properties":{"clickDestinationUrl":{"type":"string","description":"Page outreach clicks should land on. Must be a valid http(s) URL.","example":"https://acme.com/welcome"}},"required":["clickDestinationUrl"]},"BusinessContextResponse":{"type":"object","properties":{"content":{"type":"string","nullable":true}},"required":["content"]},"BusinessContextRequest":{"type":"object","properties":{"content":{"type":"string","description":"Free-form business context field-extraction reads from for a no-website brand. Large bodies (~up to 1MB) accepted.","example":"Acme Corp is a B2B SaaS selling AI-powered analytics to mid-market retailers..."}},"required":["content"]},"AttachBrandWebsiteResponse":{"type":"object","properties":{}},"AttachBrandWebsiteRequest":{"type":"object","properties":{"url":{"type":"string","description":"The website URL to attach to the no-website brand. Must be a valid http(s) URL.","example":"https://acme.com"}},"required":["url"]},"ConversionTokenResponse":{"type":"object","properties":{}},"BrandShareTokenProxyResponse":{"type":"object","properties":{}},"ResolveShareTokenProxyRequest":{"type":"object","properties":{"shareToken":{"type":"string"}},"required":["shareToken"]},"IcpSuggestResponse":{"type":"object","properties":{}},"IcpSuggestRequest":{"type":"object","properties":{}},"BrandUserFieldsResponse":{"type":"object","properties":{}},"BrandUserFieldsRequest":{"type":"object","properties":{}},"TransferBrandResponse":{"type":"object","properties":{"brandId":{"type":"string","description":"Brand ID that was transferred"},"sourceOrgId":{"type":"string","description":"Original organization ID"},"targetOrgId":{"type":"string","description":"New organization ID"},"serviceResults":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"updatedTables":{"type":"object","additionalProperties":{"type":"number"}}},"required":["updatedTables"]},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}]},"description":"Per-service transfer results: updated table counts or error"}},"required":["brandId","sourceOrgId","targetOrgId","serviceResults"]},"TransferBrandRequest":{"type":"object","properties":{"targetOrgId":{"type":"string","description":"Clerk org ID (e.g. org_xxx) of the target organization — resolved to internal UUID server-side"}},"required":["targetOrgId"]},"BrandTransferHistoryResponse":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"brandId":{"type":"string","format":"uuid"},"sourceOrgId":{"type":"string","format":"uuid"},"targetOrgId":{"type":"string","format":"uuid"},"initiatedByUserId":{"type":"string","format":"uuid"},"serviceResults":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"updatedTables":{"type":"array","items":{"type":"object","properties":{"tableName":{"type":"string"},"count":{"type":"number"}},"required":["tableName","count"]}}},"required":["updatedTables"]},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},{"type":"object","properties":{"skipped":{"type":"boolean","enum":[true]}},"required":["skipped"]}]}},"createdAt":{"type":"string"}},"required":["id","brandId","sourceOrgId","targetOrgId","initiatedByUserId","serviceResults","createdAt"]}}},"required":["transfers"]},"OutgoingBrandTransferResponse":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"brandId":{"type":"string","format":"uuid"},"sourceOrgId":{"type":"string","format":"uuid"},"targetOrgId":{"type":"string","format":"uuid"},"initiatedByUserId":{"type":"string","format":"uuid"},"serviceResults":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"updatedTables":{"type":"array","items":{"type":"object","properties":{"tableName":{"type":"string"},"count":{"type":"number"}},"required":["tableName","count"]}}},"required":["updatedTables"]},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},{"type":"object","properties":{"skipped":{"type":"boolean","enum":[true]}},"required":["skipped"]}]}},"createdAt":{"type":"string"}},"required":["id","brandId","sourceOrgId","targetOrgId","initiatedByUserId","serviceResults","createdAt"]}}},"required":["transfers"]},"IncomingBrandTransferResponse":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"brandId":{"type":"string","format":"uuid"},"sourceOrgId":{"type":"string","format":"uuid"},"targetOrgId":{"type":"string","format":"uuid"},"initiatedByUserId":{"type":"string","format":"uuid"},"serviceResults":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"updatedTables":{"type":"array","items":{"type":"object","properties":{"tableName":{"type":"string"},"count":{"type":"number"}},"required":["tableName","count"]}}},"required":["updatedTables"]},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},{"type":"object","properties":{"skipped":{"type":"boolean","enum":[true]}},"required":["skipped"]}]}},"createdAt":{"type":"string"}},"required":["id","brandId","sourceOrgId","targetOrgId","initiatedByUserId","serviceResults","createdAt"]}}},"required":["transfers"]},"EmailGatewayStatsResponse":{"type":"object","properties":{"recipientStats":{"$ref":"#/components/schemas/RecipientStats"},"emailStats":{"$ref":"#/components/schemas/EmailStats"}},"required":["recipientStats","emailStats"]},"RunsCostStatsResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"dimensions":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"Dimension key-value pairs (e.g. { brandId: '...' })"},"totalCostInUsdCents":{"type":"string"},"actualCostInUsdCents":{"type":"string"},"provisionedCostInUsdCents":{"type":"string"},"cancelledCostInUsdCents":{"type":"string"},"runCount":{"type":"number"},"totalQuantity":{"type":"string","description":"Present when groupBy includes costName"}},"required":["dimensions","totalCostInUsdCents","actualCostInUsdCents","provisionedCostInUsdCents","cancelledCostInUsdCents","runCount"]}}},"required":["groups"]},"RunEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"runId":{"type":"string","format":"uuid"},"service":{"type":"string"},"event":{"type":"string"},"detail":{"type":"string","nullable":true},"level":{"type":"string","enum":["info","warn","error"]},"data":{"nullable":true},"orgId":{"type":"string","nullable":true,"format":"uuid"},"userId":{"type":"string","nullable":true,"format":"uuid"},"brandIds":{"type":"string","nullable":true},"campaignId":{"type":"string","nullable":true,"format":"uuid"},"workflowSlug":{"type":"string","nullable":true},"featureSlug":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","runId","service","event","detail","level","orgId","userId","brandIds","campaignId","workflowSlug","featureSlug","createdAt"]},"ListEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/RunEvent"}}},"required":["events"]},"ScrapeResultResponse":{"type":"object","properties":{}},"WorkflowMetadata":{"type":"object","properties":{"id":{"type":"string","description":"Workflow ID"},"workflowSlug":{"type":"string","description":"Unique technical identifier. Use this to execute via /workflows/by-slug/{workflowSlug}/execute"},"workflowName":{"type":"string","description":"Workflow name"},"displayName":{"type":"string","nullable":true,"description":"Stable display name for the workflow family"},"workflowDynastyName":{"type":"string","description":"Stable name for the lineage. Constant across all versions of a dynasty"},"workflowDynastySlug":{"type":"string","description":"Stable slug for the lineage. Use as key for dynasty-level lookups and stats grouping"},"version":{"type":"integer","description":"Version number within the dynasty. Starts at 1"},"createdForBrandId":{"type":"string","nullable":true,"description":"Brand ID that created this workflow"},"category":{"type":"string","description":"Workflow category (e.g. 'sales', 'pr')"},"channel":{"type":"string","description":"Communication channel (e.g. 'email')"},"audienceType":{"type":"string","description":"Audience type (e.g. 'cold-outreach')"},"featureSlug":{"type":"string","description":"Feature slug this workflow belongs to (e.g. 'pr-cold-email-outreach')"},"signature":{"type":"string","description":"SHA-256 hash of the canonical DAG"},"workflowDynastySignatureName":{"type":"string","description":"Human-readable name for this DAG variant within the dynasty"},"status":{"type":"string","enum":["active","deprecated"],"description":"Dynasty lifecycle status. 'deprecated' workflows are hidden from selection. Owned by workflow-service."}},"required":["id","workflowSlug","workflowName","displayName","workflowDynastyName","workflowDynastySlug","version","createdForBrandId","featureSlug","signature","workflowDynastySignatureName"]},"ListWorkflowsResponse":{"type":"object","properties":{"workflows":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/WorkflowMetadata"},{"type":"object","properties":{"requiredProviders":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Provider name"},"domain":{"type":"string","nullable":true,"description":"Provider domain"}},"required":["name","domain"]},"description":"External providers required by this workflow"}}}]}}},"required":["workflows"]},"GetWorkflowResponse":{"allOf":[{"$ref":"#/components/schemas/WorkflowMetadata"},{"type":"object","properties":{"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true},"description":"DAG nodes"},"edges":{"type":"array","items":{"nullable":true},"description":"DAG edges"}},"required":["nodes","edges"],"description":"The DAG definition"},"requiredProviders":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Provider name"},"domain":{"type":"string","nullable":true,"description":"Provider domain"}},"required":["name","domain"]},"description":"External providers required by this workflow"}},"required":["dag"]}]},"CreateWorkflowResponse":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","description":"Workflow ID"},"name":{"type":"string","description":"Auto-generated workflow slug"},"featureSlug":{"type":"string","description":"Feature slug this workflow belongs to"},"signature":{"type":"string","description":"SHA-256 hash of the canonical DAG"},"workflowDynastySignatureName":{"type":"string","description":"Human-readable name for this DAG variant within the dynasty"},"action":{"type":"string","enum":["created","updated"],"description":"Whether the workflow was created or updated"},"humanId":{"type":"string","nullable":true,"description":"Human ID if styled after an expert"}},"required":["id","name","featureSlug","signature","workflowDynastySignatureName","action","humanId"]},"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true},"description":"DAG nodes"},"edges":{"type":"array","items":{"nullable":true},"description":"DAG edges"}},"required":["nodes","edges"]},"generatedDescription":{"type":"string","description":"AI-generated description of the workflow"}},"required":["workflow","dag","generatedDescription"]},"CreateWorkflowRequest":{"type":"object","properties":{"featureSlug":{"type":"string","minLength":1,"description":"Feature slug for the generated workflow (e.g. 'pr-cold-email-outreach')"},"description":{"type":"string","minLength":10,"description":"Natural language description of the desired workflow. Be specific about steps, services, and data flow."},"hints":{"type":"object","properties":{"services":{"type":"array","items":{"type":"string"},"description":"Scope generation to these services"},"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Suggest specific node types"},"expectedInputs":{"type":"array","items":{"type":"string"},"description":"Expected flow_input field names (e.g. campaignId, email)"}},"description":"Optional hints to guide DAG generation"}},"required":["featureSlug","description"]},"UpgradeWorkflowResponse":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","description":"Workflow ID"},"name":{"type":"string","description":"Auto-generated workflow slug"},"featureSlug":{"type":"string","description":"Feature slug this workflow belongs to"},"signature":{"type":"string","description":"SHA-256 hash of the canonical DAG"},"workflowDynastySignatureName":{"type":"string","description":"Human-readable name for this DAG variant within the dynasty"},"action":{"type":"string","enum":["created","updated"],"description":"Whether the workflow was created or updated"},"humanId":{"type":"string","nullable":true,"description":"Human ID if styled after an expert"}},"required":["id","name","featureSlug","signature","workflowDynastySignatureName","action","humanId"]},"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true},"description":"DAG nodes"},"edges":{"type":"array","items":{"nullable":true},"description":"DAG edges"}},"required":["nodes","edges"]},"generatedDescription":{"type":"string","description":"AI-generated description of the workflow"}},"required":["workflow","dag","generatedDescription"]},"UpgradeWorkflowRequest":{"type":"object","properties":{"workflowDynastySlug":{"type":"string","minLength":1,"description":"Stable dynasty slug (constant across all versions of the dynasty). The route resolves it to the currently-active row, so callers do not need to track which version is active after prior upgrades."},"description":{"type":"string","minLength":10,"description":"Natural language description of the upgrade. Required when `dag` is not provided (LLM regenerates the DAG from this description). Optional when `dag` is provided; if present, replaces the stored description on the resulting row."},"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true},"minItems":1,"description":"DAG nodes — at least one required. Full shape owned by workflow-service."},"edges":{"type":"array","items":{"nullable":true},"description":"DAG edges. Full shape owned by workflow-service."}},"required":["nodes","edges"],"description":"Optional client-supplied DAG. When provided, workflow-service skips the LLM and applies the same in-place / new-version branching as the LLM path. Full node/edge shape owned by workflow-service (see its OpenAPI). Use for surgical fixes (e.g. patch a single script node) without re-running generation."},"hints":{"type":"object","properties":{},"description":"Optional hints to guide the upgrade. Shape owned by workflow-service (see its OpenAPI for known keys). Ignored when `dag` is provided."}},"required":["workflowDynastySlug"]},"ProviderInfo":{"type":"object","properties":{"name":{"type":"string","description":"Provider name (e.g. 'anthropic', 'apollo')"},"domain":{"type":"string","nullable":true,"description":"Provider domain for logo display (e.g. 'anthropic.com'), null for internal services"}},"required":["name","domain"]},"WorkflowSummaryResponse":{"type":"object","properties":{"workflowSlug":{"type":"string","description":"Workflow slug"},"summary":{"type":"string","description":"Natural-language summary of the workflow"},"requiredProviders":{"type":"array","items":{"$ref":"#/components/schemas/ProviderInfo"},"description":"External providers required by this workflow, with domains for logo display"},"steps":{"type":"array","items":{"type":"string"},"description":"Ordered list of workflow steps in human-readable format"}},"required":["workflowSlug","summary","requiredProviders","steps"]},"WorkflowKeyStatusItem":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name (e.g. 'apollo', 'anthropic')"},"configured":{"type":"boolean","description":"Whether a key is available for this provider (via platform or org key)"},"maskedKey":{"type":"string","nullable":true,"description":"Masked org key value, or null if not configured"},"keySource":{"type":"string","enum":["org","platform"],"description":"Key source preference: 'platform' (default) or 'org' (BYOK)"}},"required":["provider","configured","maskedKey","keySource"]},"WorkflowKeyStatusResponse":{"type":"object","properties":{"workflowSlug":{"type":"string","description":"Workflow slug"},"ready":{"type":"boolean","description":"True if all required provider keys are configured"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowKeyStatusItem"},"description":"Status of each required provider key"},"missing":{"type":"array","items":{"type":"string"},"description":"List of provider names with missing keys"}},"required":["workflowSlug","ready","keys","missing"]},"TemplateRef":{"type":"object","properties":{"nodeId":{"type":"string","description":"DAG node ID"},"templateType":{"type":"string","description":"Prompt template type used by this node"},"variablesProvided":{"type":"array","items":{"type":"string"},"description":"Variable names the workflow provides to this node"}},"required":["nodeId","templateType","variablesProvided"]},"TemplateContractIssue":{"type":"object","properties":{"nodeId":{"type":"string","description":"DAG node ID that calls content-generation"},"templateType":{"type":"string","description":"Prompt template type (e.g. 'cold-email')"},"field":{"type":"string","description":"Variable name or template type"},"severity":{"type":"string","enum":["error","warning"],"description":"'error' = missing required variable, 'warning' = extra/unknown variable"},"reason":{"type":"string","description":"Human-readable explanation of the issue"}},"required":["nodeId","templateType","field","severity","reason"]},"ValidationResult":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the workflow DAG is valid"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Field that caused the error"},"message":{"type":"string","description":"Error description"}},"required":["field","message"]},"description":"Structural validation errors"},"templateContract":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether all template contracts are satisfied"},"templateRefs":{"type":"array","items":{"$ref":"#/components/schemas/TemplateRef"},"description":"Content-generation template references found in the DAG"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/TemplateContractIssue"},"description":"Variable mismatches between workflow and prompt templates"}},"required":["valid","templateRefs","issues"],"description":"Template contract validation result. Present when content-generation service is reachable."}},"required":["valid"]},"WorkflowDynastyStatusResponse":{"type":"object","properties":{}},"WorkflowDynastyStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["active","deprecated"],"description":"New lifecycle status for the workflow dynasty."}},"required":["status"],"example":{"status":"deprecated"}},"WorkflowStatusResponse":{"type":"object","properties":{}},"WorkflowStatusRequest":{"type":"object","properties":{"status":{"type":"string","minLength":1,"description":"New per-version lifecycle status, e.g. 'active' or 'deprecated'. The vocabulary is workflow-service's; the gateway forwards the body verbatim and does not validate it."}},"required":["status"],"example":{"status":"deprecated"}},"UpdateWorkflowResponse":{"allOf":[{"$ref":"#/components/schemas/WorkflowMetadata"},{"type":"object","properties":{"_action":{"type":"string","enum":["updated"],"description":"Indicates the workflow was updated in-place"},"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true}},"edges":{"type":"array","items":{"nullable":true}}},"required":["nodes","edges"]}},"required":["_action"]}]},"ForkedWorkflowResponse":{"allOf":[{"$ref":"#/components/schemas/WorkflowMetadata"},{"type":"object","properties":{"_action":{"type":"string","enum":["forked"],"description":"Indicates a new workflow was created (forked) due to a DAG signature change"},"_forkedFromName":{"type":"string","description":"Name of the source workflow that was forked"},"_forkedFromId":{"type":"string","description":"ID of the source workflow that was forked"},"_sourceDynastyDeprecated":{"type":"boolean","description":"Whether the source dynasty was deprecated as a result"},"dag":{"type":"object","properties":{"nodes":{"type":"array","items":{"nullable":true}},"edges":{"type":"array","items":{"nullable":true}}},"required":["nodes","edges"]}},"required":["_action","_forkedFromName","_forkedFromId","_sourceDynastyDeprecated"]}]},"WorkflowConflictResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"existingWorkflowId":{"type":"string","format":"uuid","description":"ID of the existing workflow that already has this DAG signature"},"existingWorkflowSlug":{"type":"string","description":"Slug of the existing workflow that already has this DAG signature"}},"required":["error","existingWorkflowId","existingWorkflowSlug"]},"DAGNode":{"type":"object","properties":{"id":{"type":"string","description":"Unique node identifier within the DAG"},"type":{"type":"string","description":"Node type (e.g. 'http.call', 'condition', 'wait', 'for-each', 'script')"},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Node-specific configuration"},"inputMapping":{"type":"object","additionalProperties":{"nullable":true},"description":"Maps input variables to this node"},"retries":{"type":"integer","minimum":0,"description":"Number of retry attempts on failure. Defaults to 3 if omitted. Set to 0 for non-idempotent operations."}},"required":["id","type"]},"DAGEdge":{"type":"object","properties":{"from":{"type":"string","description":"Source node ID"},"to":{"type":"string","description":"Target node ID"},"condition":{"type":"string","description":"JavaScript expression for conditional branching. Only used when source node is type 'condition'. Edges WITH condition: target node only executes when the condition is true. Edges WITHOUT condition from a condition node: target always executes after the branch."}},"required":["from","to"]},"DAG":{"type":"object","properties":{"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DAGNode"},"minItems":1,"description":"The steps of the workflow. Must contain at least one node."},"edges":{"type":"array","items":{"$ref":"#/components/schemas/DAGEdge"},"description":"Execution order between nodes. Empty array for single-node workflows."},"onError":{"type":"string","description":"Node ID of an error handler that runs when any node fails"}},"required":["nodes","edges"],"description":"Optional new DAG. When omitted, only metadata (description, tags) is updated in-place. When provided with the same structural signature, the DAG is updated in-place. When provided with a different structural signature, a new workflow is created (fork) and the original is kept active (unless its dynasty has zero campaign runs, in which case it is deprecated)."},"UpdateWorkflowRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Workflow name"},"description":{"type":"string","description":"Workflow description"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for filtering/grouping"},"dag":{"$ref":"#/components/schemas/DAG"}},"example":{"description":"Updated workflow description","tags":["email","outreach"],"dag":{"nodes":[{"id":"fetch-lead","type":"http.call","config":{"service":"lead","method":"POST","path":"/orgs/buffer/next"},"inputMapping":{"body.campaignId":"$ref:flow_input.campaignId"}},{"id":"send-email","type":"http.call","config":{"service":"email-gateway","method":"POST","path":"/send"},"inputMapping":{"body.to":"$ref:fetch-lead.output.lead.email"},"retries":0}],"edges":[{"from":"fetch-lead","to":"send-email"}]}}},"WorkflowRunResponse":{"type":"object","properties":{}},"ExecuteWorkflowRequest":{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"nullable":true},"description":"Runtime inputs accessible via $ref:flow_input.fieldName"}}},"ListWorkflowRunsResponse":{"type":"object","properties":{}},"GetWorkflowRunResponse":{"type":"object","properties":{}},"CancelWorkflowRunResponse":{"type":"object","properties":{}},"PromptResponse":{"type":"object","properties":{}},"VersionPromptRequest":{"type":"object","properties":{"sourceType":{"type":"string","minLength":1,"description":"The type of the prompt to create a new version from (e.g. 'cold-email')"},"prompt":{"type":"string","minLength":1,"description":"New prompt template text with {{variable}} placeholders. Must NOT contain company-specific data."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Variable name as referenced in the prompt body via {{name}}."},"description":{"type":"string","description":"Free-form description of what the caller should put for this variable. Caller decides the JSON shape — string, array, object, whatever fits the template."}},"required":["name","description"]},"description":"Inputs the template expects. Each entry is { name, description }; the caller decides the JSON shape per name."}},"required":["sourceType","prompt","variables"]},"ActivityResponse":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]},"SessionHistoryResponse":{"type":"object","properties":{}},"ChatConfigResponse":{"type":"object","properties":{"orgId":{"type":"string","description":"Organization ID"},"key":{"type":"string","description":"Config key"},"systemPrompt":{"type":"string","description":"The registered system prompt"},"allowedTools":{"type":"array","items":{"type":"string"},"description":"Allowed MCP tool names"},"createdAt":{"type":"string","description":"ISO timestamp of creation"},"updatedAt":{"type":"string","description":"ISO timestamp of last update"}},"required":["orgId","key","systemPrompt","allowedTools","createdAt","updatedAt"]},"ChatConfigRequest":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Config key identifying this configuration (e.g. \"workflow\", \"feature\")"},"systemPrompt":{"type":"string","minLength":1,"description":"System prompt for the AI assistant"},"allowedTools":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of MCP tool names this config is allowed to invoke"}},"required":["key","systemPrompt","allowedTools"]},"ChatMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The user's chat message"},"configKey":{"type":"string","minLength":1,"description":"The config key to use for this chat session (e.g. \"workflow\", \"feature\"). Must match a key previously registered via PUT /config or PUT /platform-config."},"sessionId":{"type":"string","format":"uuid","description":"UUID of an existing session to continue. Omit to create a new session. When omitted, the service creates a new session and returns its ID in the first SSE event ({\"sessionId\":\"<uuid>\"}). Use that ID in subsequent requests to continue the conversation. If a sessionId is provided but does not exist or belongs to a different org, the stream returns a \"Session not found.\" error and closes."},"context":{"type":"object","additionalProperties":{"nullable":true},"description":"Free-form JSON injected into the system prompt for this request only (not stored). Use this to pass dynamic data like workflow IDs, brand URLs, campaign objectives, etc."}},"required":["message","configKey"]},"PlatformKeyResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"PlatformKeyRequest":{"type":"object","properties":{"provider":{"type":"string","minLength":1,"description":"Provider name (e.g. 'anthropic', 'stripe')"},"apiKey":{"type":"string","minLength":1,"description":"The API key value"}},"required":["provider","apiKey"]},"PlatformPromptResponse":{"type":"object","properties":{}},"PlatformPromptRequest":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"Prompt type (e.g. 'cold-email')"},"prompt":{"type":"string","minLength":1,"description":"The prompt template text"},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Variable name as referenced in the prompt body via {{name}}."},"description":{"type":"string","description":"Free-form description of what the caller should put for this variable. Caller decides the JSON shape — string, array, object, whatever fits the template."}},"required":["name","description"]},"description":"Inputs the template expects. Each entry is { name, description }; the caller decides the JSON shape per name."}},"required":["type","prompt","variables"]},"PlatformChatConfigResponse":{"type":"object","properties":{"key":{"type":"string","description":"Config key"},"systemPrompt":{"type":"string","description":"The registered system prompt"},"allowedTools":{"type":"array","items":{"type":"string"},"description":"Allowed MCP tool names"},"createdAt":{"type":"string","description":"ISO timestamp of creation"},"updatedAt":{"type":"string","description":"ISO timestamp of last update"}},"required":["key","systemPrompt","allowedTools","createdAt","updatedAt"]},"PlatformChatConfigRequest":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Config key identifying this configuration (e.g. \"workflow\", \"feature\")"},"systemPrompt":{"type":"string","minLength":1,"description":"System prompt for the AI assistant"},"allowedTools":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of MCP tool names this config is allowed to invoke"},"thinkingLevel":{"type":"string","enum":["minimal","low","medium","high"],"description":"Per-config thinking/reasoning level applied by chat-service (e.g. raise Gemini chat thinking to medium)"}},"required":["key","systemPrompt","allowedTools"]},"BillingAccountResponse":{"type":"object","properties":{}},"BalanceResponse":{"type":"object","properties":{}},"ConfigureAutoTopupResponse":{"type":"object","properties":{}},"ConfigureAutoTopupRequest":{"type":"object","properties":{"topup_amount_cents":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Auto-topup amount in cents (integer or decimal string)"},"topup_threshold_cents":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Balance threshold in cents that triggers auto-topup (integer or decimal string)"}},"required":["topup_amount_cents","topup_threshold_cents"]},"DisableAutoTopupResponse":{"type":"object","properties":{}},"PromoCodeResponse":{"type":"object","properties":{}},"PromoCodeUpdateResponse":{"type":"object","properties":{}},"PromoCodeUpdateRequest":{"type":"object","properties":{"amountCents":{"type":"number","description":"New grant amount in cents (non-negative integer)","example":1000}},"required":["amountCents"]},"CreditGrantResponse":{"type":"object","properties":{}},"CreditGrantRequest":{"type":"object","properties":{"amountCents":{"type":"number","description":"Credit amount to grant, in cents (non-negative integer)","example":5000},"note":{"type":"string","description":"Optional human note recorded with the grant","example":"Goodwill credit"},"idempotencyKey":{"type":"string","description":"Idempotency key to dedupe retried grants","example":"grant-2026-06-23-abc"}},"required":["amountCents","idempotencyKey"]},"CreditGrantsResponse":{"type":"object","properties":{}},"FreeCreditPromisesResponse":{"type":"object","properties":{}},"PlatformCreditGrantsResponse":{"type":"object","properties":{}},"UsageDiscountResponse":{"type":"object","properties":{}},"SetUsageDiscountResponse":{"type":"object","properties":{}},"SetUsageDiscountRequest":{"type":"object","properties":{"discountPct":{"type":"number","description":"Platform-usage discount percentage (integer 0–100). Validated downstream — out-of-range rejected 400, no clamp.","example":50}},"required":["discountPct"]},"RemoveUsageDiscountResponse":{"type":"object","properties":{}},"InstantlySendingForecastResponse":{"type":"object","properties":{}},"InstantlyAccountHealthResponse":{"type":"object","properties":{}},"InstantlyAccountDetailResponse":{"type":"object","properties":{}},"InstantlyCapacityHistoryResponse":{"type":"object","properties":{}},"InstantlyReconcileResponse":{"type":"object","properties":{}},"BillingCheckoutResponse":{"type":"object","properties":{}},"CreateCheckoutSessionRequest":{"type":"object","properties":{"ui_mode":{"type":"string","enum":["embedded"],"description":"Set to 'embedded' for Stripe Embedded Checkout (in-app modal). Returns an inline client_secret instead of a redirect URL, so success_url/cancel_url do not apply. Always payment-only (requires topup_amount_cents)."},"success_url":{"type":"string","format":"uri","description":"URL to redirect after successful payment. Required for hosted checkout; omit for embedded (ui_mode='embedded')."},"cancel_url":{"type":"string","format":"uri","description":"URL to redirect on cancellation. Required for hosted checkout; omit for embedded (ui_mode='embedded')."},"mode":{"type":"string","enum":["payment","setup"],"description":"Stripe checkout mode. Setup mode stores a payment method and does not require a top-up amount."},"topup_amount_cents":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Amount to top up in cents (integer or decimal string)"}}},"BillingPortalSessionResponse":{"type":"object","properties":{}},"CreatePortalSessionRequest":{"type":"object","properties":{"return_url":{"type":"string","format":"uri","description":"URL to redirect after the portal session ends"}},"required":["return_url"]},"OrgPaymentsResponse":{"type":"object","properties":{}},"DailyBudgetResponse":{"type":"object","properties":{}},"DailyBudgetRequest":{"type":"object","properties":{"dailyBudgetCents":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Brand daily budget cap in cents (integer or decimal string)"}},"required":["dailyBudgetCents"]},"FunnelBudgetsResponse":{"type":"object","properties":{}},"FunnelBudgetsRequest":{"type":"object","properties":{}},"FunnelBudgetRequest":{"type":"object","properties":{}},"BrandEmailsResponse":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Generation ID"},"campaignId":{"type":"string"},"subject":{"type":"string","nullable":true},"bodyHtml":{"type":"string","nullable":true},"bodyText":{"type":"string","nullable":true},"sequence":{"type":"number","nullable":true},"leadFirstName":{"type":"string","nullable":true},"leadLastName":{"type":"string","nullable":true},"leadCompany":{"type":"string","nullable":true},"leadOrganizationDomain":{"type":"string","nullable":true},"leadTitle":{"type":"string","nullable":true},"leadIndustry":{"type":"string","nullable":true},"clientCompanyName":{"type":"string","nullable":true},"generationRunId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"generationRun":{"$ref":"#/components/schemas/RunCostData"}},"required":["id","campaignId","subject","bodyHtml","bodyText","sequence","leadFirstName","leadLastName","leadCompany","leadOrganizationDomain","leadTitle","leadIndustry","clientCompanyName","generationRunId","createdAt","generationRun"]}}},"required":["emails"]},"EmailByLeadResponse":{"type":"object","properties":{"generation":{"type":"object","nullable":true,"properties":{}}},"required":["generation"]},"WorkflowExamplesResponse":{"type":"object","properties":{"examples":{"type":"array","items":{"type":"object","properties":{}}}},"required":["examples"]},"SendEmailResponse":{"type":"object","properties":{"sent":{"type":"boolean","description":"Whether the email was sent"},"messageId":{"type":"string","description":"Postmark message ID"},"deduplicated":{"type":"boolean","description":"True if skipped due to dedup rules"}},"required":["sent"]},"SendEmailRequest":{"type":"object","properties":{"eventType":{"type":"string","minLength":1,"description":"Event type determining which template to use (e.g. 'webinar_welcome', 'j_minus_1')"},"recipientEmail":{"type":"string","format":"email","description":"Direct recipient email (fallback when no userId on the key)"},"bccEmails":{"type":"array","items":{"type":"string","format":"email"},"description":"True blind-copy recipients (BCC). Forwarded top-level to transactional-email-service as bccEmails; never rendered as visible To/Cc and never injected into template metadata."},"brandId":{"type":"string","description":"Brand ID for tracking"},"campaignId":{"type":"string","description":"Campaign ID for tracking"},"productId":{"type":"string","description":"Product/instance ID for product-scoped dedup (e.g. webinar ID)"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Template variables for {{variable}} interpolation"}},"required":["eventType"]},"TransactionalEmailStatsResponse":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalEmails":{"type":"number","description":"Total email events"},"sent":{"type":"number","description":"Successfully sent"},"failed":{"type":"number","description":"Failed to send"}},"required":["totalEmails","sent","failed"]}},"required":["stats"]},"ManualQualificationCreateResponse":{"type":"object","properties":{}},"ManualQualificationCreateRequest":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"description":"Logical campaign id (groups sub-campaigns for the same workflow run)"},"email":{"type":"string","format":"email","description":"Lead email address"},"status":{"type":"string","minLength":1,"description":"What a human states about the reply. instantly-service owns this vocabulary and is the only place it is authoritative — refer to its openapi.json rather than to this line, which cannot be kept in lockstep across a deploy boundary."},"notes":{"type":"string","maxLength":2000,"description":"Optional free-text human note for audit"}},"required":["campaign_id","email","status"]},"ManualQualificationListResponse":{"type":"object","properties":{}},"DeployTemplatesResponse":{"type":"object","properties":{"deployed":{"type":"number","description":"Number of templates deployed"},"message":{"type":"string","description":"Confirmation message"}},"required":["deployed","message"]},"DeployEmailTemplatesRequest":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Template name (unique per app)"},"subject":{"type":"string","minLength":1,"description":"Email subject line"},"htmlBody":{"type":"string","minLength":1,"description":"HTML body with {{variable}} interpolation"},"textBody":{"type":"string","description":"Plain text body (optional)"},"from":{"type":"string","description":"Sender address, e.g. \"Display Name <email@domain.com>\""},"messageStream":{"type":"string","description":"Postmark message stream ID, e.g. \"outbound\" or \"broadcast\""}},"required":["name","subject","htmlBody"]},"minItems":1,"description":"Templates to deploy"}},"required":["templates"]},"InternalDeployTemplatesResponse":{"type":"object","properties":{"deployed":{"type":"number"},"message":{"type":"string"}},"required":["deployed","message"]},"StripeProductResponse":{"type":"object","properties":{"id":{"type":"string","description":"Stripe product ID"},"name":{"type":"string","description":"Product name"},"description":{"type":"string","nullable":true,"description":"Product description"},"active":{"type":"boolean","description":"Whether the product is active"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Product metadata"}},"required":["id","name","description","active","metadata"]},"CreateStripeProductResponse":{"type":"object","properties":{"id":{"type":"string","description":"Stripe product ID"},"name":{"type":"string","description":"Product name"},"active":{"type":"boolean","description":"Whether the product is active"}},"required":["id","name","active"]},"CreateStripeProductRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Product name"},"description":{"type":"string","description":"Product description"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Arbitrary key-value metadata"}},"required":["name"]},"ListPricesResponse":{"type":"object","properties":{"prices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stripe price ID"},"unitAmount":{"type":"number","description":"Price in smallest currency unit (cents)"},"currency":{"type":"string","description":"ISO 4217 currency code"},"recurring":{"type":"object","nullable":true,"properties":{"interval":{"type":"string","description":"Billing interval"}},"required":["interval"],"description":"Null for one-time prices"},"active":{"type":"boolean","description":"Whether the price is active"}},"required":["id","unitAmount","currency","recurring","active"]}}},"required":["prices"]},"CreateStripePriceResponse":{"type":"object","properties":{"id":{"type":"string","description":"Stripe price ID"},"unitAmount":{"type":"number","description":"Price in cents"},"currency":{"type":"string","description":"Currency code"}},"required":["id","unitAmount","currency"]},"CreateStripePriceRequest":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Stripe product ID"},"unitAmountCents":{"type":"integer","minimum":0,"description":"Price in cents"},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"usd","description":"ISO 4217 currency code"},"recurring":{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","month","year"],"description":"Billing interval"}},"required":["interval"],"description":"Recurring pricing config (omit for one-time)"}},"required":["productId","unitAmountCents"]},"StripeCouponResponse":{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID"},"percentOff":{"type":"number","nullable":true,"description":"Percent discount"},"amountOff":{"type":"number","nullable":true,"description":"Fixed discount in smallest currency unit"},"currency":{"type":"string","nullable":true,"description":"Currency for amountOff"},"duration":{"type":"string","description":"Duration type"},"valid":{"type":"boolean","description":"Whether the coupon is still valid"}},"required":["id","percentOff","amountOff","currency","duration","valid"]},"CreateStripeCouponResponse":{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID"},"percentOff":{"type":"number","nullable":true},"amountOff":{"type":"number","nullable":true},"duration":{"type":"string"}},"required":["id","percentOff","amountOff","duration"]},"CreateStripeCouponRequest":{"type":"object","properties":{"id":{"type":"string","description":"Custom coupon ID (auto-generated if omitted)"},"percentOff":{"type":"number","minimum":0,"maximum":100,"description":"Percent discount (0-100)"},"amountOffCents":{"type":"integer","minimum":0,"description":"Fixed discount in cents"},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"Currency for amountOff (required if amountOff is set)"},"duration":{"type":"string","enum":["once","repeating","forever"],"description":"How long the coupon applies"},"durationInMonths":{"type":"integer","minimum":1,"description":"Months for 'repeating' duration"}},"required":["duration"]},"StripeCheckoutResponse":{"type":"object","properties":{"url":{"type":"string","description":"Stripe Checkout URL to redirect the customer to"},"sessionId":{"type":"string","description":"Stripe Checkout session ID"}},"required":["url","sessionId"]},"CreateStripeCheckoutRequest":{"type":"object","properties":{"lineItems":{"type":"array","items":{"type":"object","properties":{"priceId":{"type":"string","minLength":1,"description":"Stripe price ID"},"quantity":{"type":"integer","minimum":1,"default":1,"description":"Quantity"}},"required":["priceId"]},"minItems":1,"description":"Line items for checkout"},"mode":{"type":"string","enum":["payment"],"description":"Checkout mode (payment only)"},"successUrl":{"type":"string","format":"uri","description":"Redirect URL after success"},"cancelUrl":{"type":"string","format":"uri","description":"Redirect URL after cancel"},"customerEmail":{"type":"string","format":"email","description":"Pre-fill customer email"},"customerId":{"type":"string","description":"Existing Stripe customer ID"},"discounts":{"type":"array","items":{"type":"object","properties":{"couponId":{"type":"string","minLength":1,"description":"Stripe coupon ID"}},"required":["couponId"]},"description":"Coupons to apply"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata for the checkout session"}},"required":["lineItems","successUrl","cancelUrl"]},"StripeStatsResponse":{"type":"object","properties":{"totalPayments":{"type":"number","description":"Total number of payments"},"totalAmountInCents":{"type":"number","description":"Total payment amount in cents"},"successCount":{"type":"number","description":"Successful payments"},"failureCount":{"type":"number","description":"Failed payments"},"refundCount":{"type":"number","description":"Refunded payments"},"disputeCount":{"type":"number","description":"Disputed payments"}},"required":["totalPayments","totalAmountInCents","successCount","failureCount","refundCount","disputeCount"]},"ResolveUserResponse":{"type":"object","properties":{"orgId":{"type":"string","format":"uuid","description":"Internal organization UUID"},"userId":{"type":"string","format":"uuid","description":"Internal user UUID"},"orgCreated":{"type":"boolean","description":"Whether a new org was created"},"userCreated":{"type":"boolean","description":"Whether a new user was created"}},"required":["orgId","userId","orgCreated","userCreated"]},"ResolveUserRequest":{"type":"object","properties":{"externalOrgId":{"type":"string","minLength":1,"description":"External organization ID from identity provider"},"externalUserId":{"type":"string","minLength":1,"description":"External user ID — use a generated UUID for anonymous users"},"email":{"type":"string","format":"email","description":"User email address"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"imageUrl":{"type":"string","format":"uri","description":"User avatar URL"}},"required":["externalOrgId","externalUserId"]},"ListUsersUser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal user UUID"},"externalId":{"type":"string","description":"External user ID from identity provider"},"email":{"type":"string","nullable":true,"description":"User email address"},"firstName":{"type":"string","nullable":true,"description":"User first name"},"lastName":{"type":"string","nullable":true,"description":"User last name"},"imageUrl":{"type":"string","nullable":true,"description":"User avatar URL"},"phone":{"type":"string","nullable":true,"description":"User phone number"},"createdAt":{"type":"string","description":"ISO timestamp of user creation"}},"required":["id","externalId","email","firstName","lastName","imageUrl","phone","createdAt"]},"ListUsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/ListUsersUser"},"description":"List of users"},"total":{"type":"integer","description":"Total number of users matching the query"},"limit":{"type":"integer","description":"Limit used for this page"},"offset":{"type":"integer","description":"Offset used for this page"}},"required":["users","total","limit","offset"]},"PlatformService":{"type":"object","properties":{"name":{"type":"string","description":"Service name (e.g. 'lead', 'campaign')"},"baseUrl":{"type":"string","description":"Service base URL"},"openapiUrl":{"type":"string","description":"URL to the service's OpenAPI spec"}},"required":["name","baseUrl","openapiUrl"]},"PlatformServicesResponse":{"type":"object","properties":{"services":{"type":"array","items":{"$ref":"#/components/schemas/PlatformService"},"description":"List of registered platform services"}},"required":["services"]},"OpenApiSpec":{"type":"object","properties":{}},"ContentComposeResponse":{"type":"object","properties":{"composedVideoUrl":{"type":"string","format":"uri","description":"URL of the composed video"}},"required":["composedVideoUrl"]},"ContentComposeRequest":{"type":"object","properties":{"videoUrl":{"type":"string","format":"uri","description":"Source video URL"},"name":{"type":"string","description":"Name to overlay"},"age":{"type":"number","description":"Age to overlay"},"theme":{"type":"string","description":"Theme text"},"text":{"type":"string","description":"Quote text to overlay"},"outputBlobToken":{"type":"string","description":"Vercel Blob write token for the output"},"layout":{"type":"string","enum":["quote-top","webcam-top"],"default":"quote-top","description":"Video layout variant"}},"required":["videoUrl","name","age","theme","text","outputBlobToken"]},"GenerateExpertQuotePitchResponse":{"type":"object","properties":{}},"GenerateExpertQuotePitchRequest":{"type":"object","properties":{}},"PromptAssignmentResponse":{"type":"object","properties":{}},"PromptAssignmentRequest":{"type":"object","properties":{}},"LlmServiceOverview":{"type":"object","properties":{"service":{"type":"string","description":"Service name"},"title":{"type":"string","description":"Service title"},"description":{"type":"string","description":"Service description"},"error":{"type":"string","description":"Error message if service metadata could not be loaded"},"endpointCount":{"type":"number","description":"Number of endpoints exposed by this service"}},"required":["service","endpointCount"]},"LlmContextResponse":{"type":"object","properties":{"_description":{"type":"string","description":"Description of this context payload"},"_workflow":{"type":"string","description":"Progressive-disclosure workflow: overview first, then drill into a service"},"serviceCount":{"type":"number","description":"Total number of registered services"},"services":{"type":"array","items":{"$ref":"#/components/schemas/LlmServiceOverview"},"description":"Lightweight service list (use /llm-context/{service} for endpoints)"}},"required":["_description","_workflow","serviceCount","services"]},"LlmEndpointSummary":{"type":"object","properties":{"method":{"type":"string","description":"HTTP method"},"path":{"type":"string","description":"Endpoint path"},"summary":{"type":"string","description":"Endpoint summary"}},"required":["method","path","summary"]},"LlmEndpointGroup":{"type":"object","properties":{"group":{"type":"string","description":"Path group prefix"},"endpointCount":{"type":"number","description":"Number of endpoints in this group"},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/LlmEndpointSummary"},"description":"Endpoints in this group"}},"required":["group","endpointCount","endpoints"]},"LlmServiceDetailResponse":{"type":"object","properties":{"service":{"type":"string","description":"Service name"},"title":{"type":"string","description":"Service title"},"description":{"type":"string","description":"Service description"},"endpointCount":{"type":"number","description":"Number of endpoints returned"},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/LlmEndpointSummary"},"description":"Flat endpoint list (for small services)"},"totalEndpoints":{"type":"number","description":"Total endpoints (when grouped)"},"groupCount":{"type":"number","description":"Number of groups (when grouped)"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/LlmEndpointGroup"},"description":"Grouped endpoints (for large services with 30+ endpoints)"}},"required":["service"]},"FeaturesListResponse":{"type":"object","properties":{}},"FeatureResponse":{"type":"object","properties":{}},"EntitiesRegistryResponse":{"type":"object","properties":{}},"StatsRegistryResponse":{"type":"object","properties":{}},"GlobalStatsResponse":{"type":"object","properties":{}},"PrefillFeatureResponse":{"type":"object","properties":{"slug":{"type":"string"},"brandId":{"type":"string"},"format":{"type":"string","enum":["text","full"]},"prefilled":{"type":"object","additionalProperties":{"nullable":true}}},"required":["slug","brandId","format","prefilled"]},"PrefillFeatureRequest":{"type":"object","properties":{"brandIds":{"type":"array","items":{"type":"string"},"description":"Non-empty array of brand UUIDs to prefill from","example":["brand-uuid-123"]}},"required":["brandIds"]},"FeaturePipelineActivityResponse":{"type":"object","properties":{}},"FeatureStatsResponse":{"type":"object","properties":{}},"FeatureRevenueResponse":{"type":"object","properties":{}},"FeatureAudienceStatsResponse":{"type":"object","properties":{}},"OfferRevenueResponse":{"type":"object","properties":{}},"OfferFunnelsResponse":{"type":"object","properties":{}},"OfferAudienceStatsResponse":{"type":"object","properties":{}},"OfferPipelineActivityResponse":{"type":"object","properties":{}},"BrandRevenueResponse":{"type":"object","properties":{}},"BrandAudienceStatsResponse":{"type":"object","properties":{}},"BrandPipelineActivityResponse":{"type":"object","properties":{}},"BrandOffersResponse":{"type":"object","properties":{}},"WorkflowProjectionResponse":{"type":"object","properties":{}},"FeatureGoalArbitrationResponse":{"type":"object","properties":{}},"PublicUserStatsResponse":{"type":"object","properties":{}},"PublicBillingStatsResponse":{"type":"object","properties":{}},"PublicRunStatsResponse":{"type":"object","properties":{}},"ConversionIngestResponse":{"type":"object","properties":{}},"ConversionIngestRequest":{"type":"object","properties":{}},"PublicFeaturesListResponse":{"type":"object","properties":{}},"PlatformPrice":{"type":"object","properties":{"id":{"type":"string","description":"Platform price row id"},"name":{"type":"string","description":"Stable identifier (e.g. 'input_tokens_sonnet_4_6')"},"provider":{"type":"string","description":"Provider name (e.g. 'anthropic', 'openai')"},"providerDomain":{"type":"string","nullable":true,"description":"Provider domain for logo.dev rendering, nullable"},"type":{"type":"string","description":"Human-readable cost type (e.g. 'Input tokens (Sonnet 4.6)')"},"unit":{"type":"string","description":"Billing unit (e.g. '1M tokens', '1 request')"},"costPerUnitInUsdCents":{"type":"string","description":"Cost per unit, decimal-string USD cents (full precision)"},"effectiveFrom":{"type":"string","description":"ISO timestamp the price became effective"}},"required":["id","name","provider","providerDomain","type","unit","costPerUnitInUsdCents","effectiveFrom"]},"PlatformPricesResponse":{"type":"array","items":{"$ref":"#/components/schemas/PlatformPrice"}},"AdminBrandsResponse":{"type":"object","properties":{}},"QuoteRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"featuredQuestionId":{"type":"integer"},"source":{"type":"string"},"mediaOutlet":{"type":"string","nullable":true},"opportunityText":{"type":"string"},"pitchUrl":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"fetchedAt":{"type":"string"},"orgId":{"type":"string","format":"uuid"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","featuredQuestionId","source","mediaOutlet","opportunityText","pitchUrl","deadline","fetchedAt","orgId","createdAt","updatedAt"]},"QuoteRequestsListResponse":{"type":"object","properties":{"quoteRequests":{"type":"array","items":{"$ref":"#/components/schemas/QuoteRequest"}}},"required":["quoteRequests"]},"QuoteRequestsStatsResponse":{"type":"object","properties":{"totalRequests":{"type":"integer"},"totalPitched":{"type":"integer"},"totalSelected":{"type":"integer"},"totalPublished":{"type":"integer"},"totalNotSelected":{"type":"integer"}},"required":["totalRequests","totalPitched","totalSelected","totalPublished","totalNotSelected"]},"QuoteRequestResponse":{"type":"object","properties":{"quoteRequest":{"$ref":"#/components/schemas/QuoteRequest"}},"required":["quoteRequest"]},"QuotePitch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"quoteRequestId":{"type":"string","format":"uuid"},"featuredQuestionId":{"type":"integer"},"featuredProfileId":{"type":"integer"},"campaignId":{"type":"string","format":"uuid"},"brandId":{"type":"string","format":"uuid"},"draft":{"type":"string"},"submittedAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["drafted","submitted","selected","published","not_selected","error"]},"featuredArticleUrl":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"parentRunId":{"type":"string","nullable":true,"format":"uuid"},"runId":{"type":"string","nullable":true,"format":"uuid"},"orgId":{"type":"string","format":"uuid"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","quoteRequestId","featuredQuestionId","featuredProfileId","campaignId","brandId","draft","submittedAt","status","featuredArticleUrl","error","parentRunId","runId","orgId","createdAt","updatedAt"]},"QuotePitchesListResponse":{"type":"object","properties":{"quotePitches":{"type":"array","items":{"$ref":"#/components/schemas/QuotePitch"}}},"required":["quotePitches"]},"QuotePitchResponse":{"type":"object","properties":{"quotePitch":{"$ref":"#/components/schemas/QuotePitch"}},"required":["quotePitch"]},"OpportunitiesListResponse":{"type":"object","properties":{}},"OpportunityNextResponse":{"type":"object","properties":{}},"OpportunityNextRequest":{"type":"object","properties":{}},"OpportunityDiscoverResponse":{"type":"object","properties":{}},"OpportunityDiscoverRequest":{"type":"object","properties":{}},"OpportunityReplyResponse":{"type":"object","properties":{}},"OpportunityReplyRequest":{"type":"object","properties":{}},"VisibilityScoreWeights":{"type":"object","properties":{"brandMentionRate":{"type":"number","minimum":0,"maximum":1},"citationRate":{"type":"number","minimum":0,"maximum":1},"positionScore":{"type":"number","minimum":0,"maximum":1},"shareOfVoice":{"type":"number","minimum":0,"maximum":1},"sentiment":{"type":"number","minimum":0,"maximum":1},"brandAndUrlRate":{"type":"number","minimum":0,"maximum":1}},"required":["brandMentionRate","citationRate","positionScore","shareOfVoice","sentiment","brandAndUrlRate"]},"VisibilityScoreRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"brandId":{"type":"string","format":"uuid"},"parentRunId":{"type":"string","nullable":true,"format":"uuid"},"runId":{"type":"string","nullable":true,"format":"uuid"},"domain":{"type":"string"},"brandName":{"type":"string"},"llmProvider":{"type":"string"},"llmModel":{"type":"string"},"promptGenModel":{"type":"string"},"extractionProvider":{"type":"string"},"extractionModel":{"type":"string"},"nPrompts":{"type":"number"},"weights":{"$ref":"#/components/schemas/VisibilityScoreWeights"},"visibilityScore":{"type":"string","nullable":true},"brandMentionRate":{"type":"string","nullable":true},"shareOfVoice":{"type":"string","nullable":true},"netSentiment":{"type":"string","nullable":true},"citationRate":{"type":"string","nullable":true},"avgPosition":{"type":"string","nullable":true},"promptGenSystemPrompt":{"type":"string","nullable":true,"description":"Exact system prompt string sent to the prompt-generator LLM (one call per run, drives the prompts the judges then answer)."},"promptGenUserMessage":{"type":"string","nullable":true,"description":"Exact user message string sent to the prompt-generator LLM. Includes the brand context fields (industry, audience, offerings, geography) — these influence which prompts get generated."},"status":{"type":"string"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","orgId","brandId","parentRunId","runId","domain","brandName","llmProvider","llmModel","promptGenModel","extractionProvider","extractionModel","nPrompts","weights","visibilityScore","brandMentionRate","shareOfVoice","netSentiment","citationRate","avgPosition","status","startedAt","completedAt","createdAt"]},"VisibilityScoreRunWithDelta":{"allOf":[{"$ref":"#/components/schemas/VisibilityScoreRun"},{"type":"object","properties":{"visibility_score_delta":{"type":"string","nullable":true},"share_of_voice_delta":{"type":"string","nullable":true},"net_sentiment_delta":{"type":"string","nullable":true},"position_delta":{"type":"string","nullable":true}},"required":["visibility_score_delta","share_of_voice_delta","net_sentiment_delta","position_delta"]}]},"VisibilityScoreRunsListResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/VisibilityScoreRunWithDelta"}},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["runs","limit","offset"]},"VisibilityScoreRunCreateResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{}}}},"required":["results"]},"VisibilityScoreRunCreateRequest":{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid"}}},"VisibilityScorePrompt":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"promptIndex":{"type":"number"},"promptText":{"type":"string"},"judgeSystemPrompt":{"type":"string","nullable":true,"description":"Exact system prompt string sent to the judge LLM. Persisted for full debug transparency."},"judgeUserMessage":{"type":"string","nullable":true,"description":"Exact user message string sent to the judge LLM. Equals `promptText` (server does NOT inject brand context into the judge call)."},"extractorSystemPrompt":{"type":"string","nullable":true,"description":"Exact system prompt string sent to the extractor LLM (the extractor analyzes the judge's output)."},"extractorUserMessage":{"type":"string","nullable":true,"description":"Exact user message string sent to the extractor LLM. Includes `Target brand: <name + domain>` + the judge response."},"responseText":{"type":"string"},"responseLengthChars":{"type":"number","nullable":true},"brandFound":{"type":"boolean","nullable":true},"brandCount":{"type":"number","nullable":true},"brandPosition":{"type":"number","nullable":true},"urlFound":{"type":"boolean","nullable":true},"urlCount":{"type":"number","nullable":true},"brandAndUrlCoOccurrence":{"type":"boolean","nullable":true},"maxBrandsInResponse":{"type":"number","nullable":true},"sentiment":{"type":"string","nullable":true},"sentimentScore":{"type":"string","nullable":true},"citationUrls":{"type":"array","nullable":true,"items":{"type":"string"}},"latencyMs":{"type":"number","nullable":true},"tokensInput":{"type":"number","nullable":true},"tokensOutput":{"type":"number","nullable":true}},"required":["id","promptIndex","promptText","judgeSystemPrompt","judgeUserMessage","extractorSystemPrompt","extractorUserMessage","responseText","responseLengthChars","brandFound","brandCount","brandPosition","urlFound","urlCount","brandAndUrlCoOccurrence","maxBrandsInResponse","sentiment","sentimentScore","citationUrls","latencyMs","tokensInput","tokensOutput"]},"VisibilityScoreCompetitor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"promptIdFk":{"type":"string","format":"uuid"},"competitorName":{"type":"string"},"competitorUrl":{"type":"string","nullable":true},"position":{"type":"number","nullable":true},"sentiment":{"type":"string","nullable":true},"sentimentScore":{"type":"string","nullable":true},"citationUrl":{"type":"string","nullable":true}},"required":["id","promptIdFk","competitorName","competitorUrl","position","sentiment","sentimentScore","citationUrl"]},"VisibilityScoreTopCompetitor":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","nullable":true},"mention_count":{"type":"number"},"avg_position":{"type":"number","nullable":true},"share_of_voice":{"type":"number"},"net_sentiment":{"type":"number"}},"required":["name","url","mention_count","avg_position","share_of_voice","net_sentiment"]},"VisibilityScoreCitationOpportunity":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"number"}},"required":["domain","count"]},"VisibilityScoreRunDetailResponse":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/VisibilityScoreRun"},"prompts":{"type":"array","items":{"$ref":"#/components/schemas/VisibilityScorePrompt"}},"competitors":{"type":"array","items":{"$ref":"#/components/schemas/VisibilityScoreCompetitor"}},"top_competitors":{"type":"array","items":{"$ref":"#/components/schemas/VisibilityScoreTopCompetitor"}},"citation_opportunities":{"type":"array","items":{"$ref":"#/components/schemas/VisibilityScoreCitationOpportunity"}}},"required":["run","prompts","competitors","top_competitors","citation_opportunities"]},"InviteValidateResponse":{"type":"object","properties":{}},"InviteValidateRequest":{"type":"object","properties":{}},"WaitlistRequestAccessResponse":{"type":"object","properties":{}},"WaitlistRequestAccessRequest":{"type":"object","properties":{}},"WaitlistPositionResponse":{"type":"object","properties":{}},"OrgInvitesStatusResponse":{"type":"object","properties":{}},"OrgInvitesClaimResponse":{"type":"object","properties":{}},"OrgInvitesClaimRequest":{"type":"object","properties":{}},"BrandPauseResponse":{"type":"object","properties":{}},"BrandPauseRequest":{"type":"object","properties":{"paused":{"type":"boolean","description":"Desired pause state for the brand"}},"required":["paused"]},"BrandSpendableBudgetResponse":{"type":"object","properties":{}},"AudienceSuggestResponse":{"type":"object","properties":{}},"AudienceStatsResponse":{"type":"object","properties":{}},"AudienceResponse":{"type":"object","properties":{}},"AudienceListResponse":{"type":"object","properties":{}},"AudienceMembersResponse":{"type":"object","properties":{}},"CrmPassthroughResponse":{"type":"object","properties":{}},"CrmUploadMultipartBody":{"type":"object","properties":{"file":{"type":"string","description":"The CSV file to ingest","format":"binary"},"brandId":{"type":"string","format":"uuid","description":"Brand the contacts belong to (required)"},"columnMapping":{"type":"string","description":"Optional JSON column-mapping override"}},"required":["file","brandId"]},"CrmPassthroughRequest":{"type":"object","properties":{}},"MailingListPassthroughResponse":{"type":"object","properties":{}},"MailingListSubscribersAddRequest":{"type":"object","properties":{}},"MailingListUpdateRequest":{"type":"object","properties":{}},"PlatformUploadResponse":{"type":"object","properties":{}},"PlatformUploadRequest":{"type":"object","properties":{}}},"parameters":{}},"paths":{"/":{"get":{"tags":["Health"],"summary":"API info","description":"Returns API name, version, and docs URL","responses":{"200":{"description":"API information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiInfoResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getRoot","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/health":{"get":{"tags":["Health"],"summary":"Health check","description":"Returns service health status","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getHealth","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/openapi.json":{"get":{"tags":["Health"],"summary":"OpenAPI specification","description":"Returns the OpenAPI 3.0 JSON document for this API — the document you are reading. It describes every operation you can call with your API key.","responses":{"200":{"description":"OpenAPI 3.0 specification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocumentResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Spec not generated yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getOpenapiJson","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/public/features/ranked":{"get":{"tags":["Features"],"summary":"Ranked features (public)","description":"Public ranked workflows by performance. Proxied to features-service. featureSlug and groupBy are required. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Stats key to rank by (required). e.g. 'recipientsRepliesPositive', 'leadsServed'. Use GET /v1/features/stats/registry for the full list.","example":"recipientsRepliesPositive"},"required":true,"description":"Stats key to rank by (required). e.g. 'recipientsRepliesPositive', 'leadsServed'. Use GET /v1/features/stats/registry for the full list.","name":"objective","in":"query"},{"schema":{"type":"string","enum":["workflow","brand"],"description":"'workflow' or 'brand' — group results by workflow or by brand.","example":"workflow"},"required":true,"description":"'workflow' or 'brand' — group results by workflow or by brand.","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Max results (default 3)","example":"10"},"required":false,"description":"Max results (default 3)","name":"limit","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Pass-through from features-service. Each result has a stats object with dynamic keys matching the feature's outputs (e.g. recipientsSent, recipientsRepliesPositive, recipientPositiveReplyRate, costPerRecipientPositiveReplyCents). For groupBy=brand, result items may include optional public-safe timeline points: date, cumulativePipelineUsd, emailsSent, emailsOpened, emailsClicked, emailsReplied. Use GET /v1/features/stats/registry for the canonical stats key list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankedResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesRanked"}},"/v1/public/features/best":{"get":{"tags":["Features"],"summary":"Hero records (public)","description":"Public hero records — best cost-per-outcome. Proxied to features-service. featureSlug and groupBy are required. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","enum":["workflow","brand"],"description":"'workflow' or 'brand' — group results by workflow or by brand.","example":"workflow"},"required":true,"description":"'workflow' or 'brand' — group results by workflow or by brand.","name":"groupBy","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Pass-through from features-service. Best cost-per-outcome records per metric.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request — featureSlug is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesBest"}},"/v1/public/features/revenue":{"get":{"tags":["Features"],"summary":"Public feature revenue","description":"Public expected-pipeline revenue, cost-of-acquisition percentage, and ROI multiple for a feature, grouped by brand or workflow. Proxied to features-service GET /public/stats/revenue. Response is producer-owned and may include brand or workflow results with headline.totalPipelineUsd and costEconomics. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","enum":["brand","workflow"],"description":"Group public revenue results by brand or workflow.","example":"workflow"},"required":true,"description":"Group public revenue results by brand or workflow.","name":"groupBy","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public feature revenue — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFeatureRevenueResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesRevenue"}},"/v1/public/features/workflow-engagement-latency":{"get":{"tags":["Features"],"summary":"Public workflow engagement latency","description":"Public average/median time to first link click and first positive reply for a feature, grouped by workflow. Proxied to features-service GET /public/stats/workflow-engagement-latency. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","enum":["workflow"],"description":"Group public workflow engagement latency results by workflow.","example":"workflow"},"required":true,"description":"Group public workflow engagement latency results by workflow.","name":"groupBy","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public workflow engagement latency — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWorkflowEngagementLatencyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesWorkflowEngagementLatency"}},"/v1/public/features/cost-projection":{"get":{"tags":["Features"],"summary":"Public feature cost projection","description":"Public feature-wide expected cost per meeting-booked and per purchase. Proxied to features-service GET /public/stats/cost-projection. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public feature cost projection — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCostProjectionResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesCostProjection"}},"/v1/public/features/cost-per-outcome-trend":{"get":{"tags":["Features"],"summary":"Public cost-per-outcome trend","description":"Public cross-org dated moving-average cost-per-outcome series for a feature and one objective. Proxied to features-service GET /public/stats/cost-per-outcome-trend. Forwards featureSlug, objective, and optional days/windowOutcomes. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","example":"positiveReply"},"required":true,"description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","name":"objective","in":"query"},{"schema":{"type":"string","description":"Number of trailing display days to emit (default 30, max 180).","example":"30"},"required":false,"description":"Number of trailing display days to emit (default 30, max 180).","name":"days","in":"query"},{"schema":{"type":"string","description":"Target outcomes per moving-average window (default 100).","example":"100"},"required":false,"description":"Target outcomes per moving-average window (default 100).","name":"windowOutcomes","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public cost-per-outcome trend — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCostPerOutcomeTrendResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesCostPerOutcomeTrend"}},"/v1/public/features/best-model-cost-per-outcome-trend":{"get":{"tags":["Features"],"summary":"Public best-model cost-per-outcome trend","description":"Public cross-org dated cost-per-outcome timeseries of the single BEST workflow model for a feature and one objective — the drop-in replacement for the pooled cost-per-outcome-trend, coherent with the best-model headline (min cost-per-outcome across workflows). Every point is a single workflow's cost, never pooled across workflows. Proxied to features-service GET /public/stats/best-model-cost-per-outcome-trend. Forwards featureSlug, objective, and optional days/windowOutcomes. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","example":"positiveReply"},"required":true,"description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","name":"objective","in":"query"},{"schema":{"type":"string","description":"Number of trailing display days to emit (default 30, max 180).","example":"30"},"required":false,"description":"Number of trailing display days to emit (default 30, max 180).","name":"days","in":"query"},{"schema":{"type":"string","description":"Target outcomes per moving-average window (default 100).","example":"100"},"required":false,"description":"Target outcomes per moving-average window (default 100).","name":"windowOutcomes","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public best-model cost-per-outcome trend — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBestModelCostPerOutcomeTrendResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesBestModelCostPerOutcomeTrend"}},"/v1/public/features/workflow-cost-per-outcome":{"get":{"tags":["Features"],"summary":"Public per-workflow cost-per-outcome","description":"Public cross-org per-workflow-dynasty cost-per-outcome ratio for a feature and one objective. Proxied to features-service GET /public/stats/workflow-cost-per-outcome. Forwards featureSlug and objective. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","example":"positiveReply"},"required":true,"description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","name":"objective","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public per-workflow cost-per-outcome — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWorkflowCostPerOutcomeResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesWorkflowCostPerOutcome"}},"/v1/public/features/cost-per-outcome-lifetime":{"get":{"tags":["Features"],"summary":"Public lifetime cost-per-outcome","description":"Public lifetime (all-history) cross-org average cost-per-outcome across all optimization objectives for a feature. Proxied to features-service GET /public/stats/cost-per-outcome-lifetime. Forwards featureSlug. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public lifetime cost-per-outcome — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCostPerOutcomeLifetimeResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesCostPerOutcomeLifetime"}},"/v1/public/features/cost-per-outcome-distribution":{"get":{"tags":["Features"],"summary":"Public cost-per-outcome distribution","description":"Public cross-org distribution (histogram + spread) of cost-per-outcome across brands for a feature and one objective. Proxied to features-service GET /public/stats/cost-per-outcome-distribution. Forwards featureSlug, objective, and optional buckets. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","example":"positiveReply"},"required":true,"description":"Optimization objective — one of websiteVisit / positiveReply / signup / formSubmission / meetingBooked / purchase (required).","name":"objective","in":"query"},{"schema":{"type":"string","description":"Number of equal-width histogram bars (default 10, max 50).","example":"10"},"required":false,"description":"Number of equal-width histogram bars (default 10, max 50).","name":"buckets","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Public cost-per-outcome distribution — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCostPerOutcomeDistributionResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicFeaturesCostPerOutcomeDistribution"}},"/v1/public/channels":{"get":{"tags":["Features"],"summary":"Public acquisition-channel catalogue","description":"The published acquisition-channel catalogue: every channel a customer can book, the commercial terms committed to before anything is measured, the kinds of step it can produce, and the sales funnels that follow. The marketing site is generated from this read, so no customer identity appears anywhere on the path. Proxied to features-service GET /public/channels. The caller's query string is forwarded verbatim. Response is producer-owned. No authentication required.","responses":{"200":{"description":"Acquisition-channel catalogue — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChannelCatalogueResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicChannels","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/public/channel-funnel-economics":{"get":{"tags":["Features"],"summary":"Public per-(sales funnel, channel) economics","description":"One row per (sales funnel, acquisition channel) pair: either the pair's measured economics — cost per step, cost per sale, return per dollar — or an explicit not-enough-data answer naming the missing ingredient. Public by design at the producer, so no identity is required here either. Proxied to features-service GET /public/channel-funnel-economics. The caller's query string is forwarded verbatim; the documented parameter below is the one features-service publishes today, not a whitelist. Response is producer-owned. No authentication required.","parameters":[{"schema":{"type":"string","description":"Narrow to one channel. Omitted returns every pair in the catalogue. An unknown slug is a 404 at features-service, never an empty pair list.","example":"sales-cold-email-outreach"},"required":false,"description":"Narrow to one channel. Omitted returns every pair in the catalogue. An unknown slug is a 404 at features-service, never an empty pair list.","name":"channelSlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Per-pair economics — pass-through from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChannelFunnelEconomicsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Unknown channel slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PublicChannelFunnelEconomics"}},"/v1/workflows/ranked":{"get":{"tags":["Workflows"],"summary":"Ranked workflows","description":"Workflows ranked by performance, scoped to the authenticated org. Proxied to features-service. featureSlug and groupBy are required.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Stats key to rank by (required). e.g. 'recipientsRepliesPositive', 'leadsServed'. Use GET /v1/features/stats/registry for the full list.","example":"recipientsRepliesPositive"},"required":true,"description":"Stats key to rank by (required). e.g. 'recipientsRepliesPositive', 'leadsServed'. Use GET /v1/features/stats/registry for the full list.","name":"objective","in":"query"},{"schema":{"type":"string","enum":["workflow","brand"],"description":"'workflow' or 'brand' — group results by workflow or by brand.","example":"workflow"},"required":true,"description":"'workflow' or 'brand' — group results by workflow or by brand.","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Max results (default 3)","example":"10"},"required":false,"description":"Max results (default 3)","name":"limit","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Pass-through from features-service. Each result has a stats object with dynamic keys matching the feature's outputs (e.g. recipientsSent, recipientsRepliesPositive, recipientPositiveReplyRate, costPerRecipientPositiveReplyCents). For groupBy=brand, result items may include optional public-safe timeline points: date, cumulativePipelineUsd, emailsSent, emailsOpened, emailsClicked, emailsReplied. Use GET /v1/features/stats/registry for the canonical stats key list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankedResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request from features-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowsRanked"}},"/v1/workflows/best":{"get":{"tags":["Workflows"],"summary":"Hero records","description":"Best cost-per-outcome records, scoped to the authenticated org. Proxied to features-service. featureSlug and groupBy are required.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug (required).","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug (required).","name":"featureSlug","in":"query"},{"schema":{"type":"string","enum":["workflow","brand"],"description":"'workflow' or 'brand' — group results by workflow or by brand.","example":"workflow"},"required":true,"description":"'workflow' or 'brand' — group results by workflow or by brand.","name":"groupBy","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Pass-through from features-service. Best cost-per-outcome records per metric.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request — featureSlug is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowsBest"}},"/v1/me":{"get":{"tags":["User"],"summary":"Get current user info","description":"Returns the authenticated user and organization details","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Current user and org info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Me","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","description":"List all campaigns for the organization. Supports filtering by brandId, status, and slug params. Use workflowDynastySlug/featureDynastySlug to filter by lineage (matches all versions), or workflowSlug/featureSlug for exact version match.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by brand ID","example":"brand-uuid-123"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by status (e.g. 'active', 'stopped', 'all')","example":"active"},"required":false,"description":"Filter by status (e.g. 'active', 'stopped', 'all')","name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by exact versioned workflow slug","example":"sales-email-cold-outreach-sienna-v3"},"required":false,"description":"Filter by exact versioned workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (matches all versions in the lineage)","example":"sales-email-cold-outreach-sienna"},"required":false,"description":"Filter by workflow dynasty slug (matches all versions in the lineage)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (matches all versions in the lineage)","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature dynasty slug (matches all versions in the lineage)","name":"featureDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Campaigns"},"post":{"tags":["Campaigns"],"summary":"Create a campaign","description":"Create a new campaign. Requires feature inputs and at least one of featureSlug/featureDynastySlug plus one of workflowSlug/workflowDynastySlug.\n\nUse `workflowDynastySlug`/`featureDynastySlug` (preferred) to let campaign-service resolve to the latest version automatically. Use `workflowSlug`/`featureSlug` only to pin to a specific version. Feature inputs are validated by key-presence against features-service (api-service never inspects values).\n\nThe body is a PASSTHROUGH: the fields below are the ones the gateway itself needs, and every other field campaign-service accepts is forwarded unchanged. A sales-outreach campaign must state the sales funnel it sells as `funnelKey` (`reply_meeting` | `visit_meeting` | `visit_signup` | `visit_form`) — that is what the campaign is paced and priced on. The gateway neither infers nor defaults one: state no funnel on a sales feature and campaign-service's own 400 comes back verbatim.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}}},"responses":{"200":{"description":"Created campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Campaigns","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/campaigns/{id}":{"get":{"tags":["Campaigns"],"summary":"Get a campaign","description":"Get a specific campaign by ID","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Campaign data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCampaignResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CampaignsById"},"patch":{"tags":["Campaigns"],"summary":"Update a campaign","description":"Update campaign fields (name, settings, etc.)","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Updated campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1CampaignsById"}},"/v1/brands/{brandId}/campaigns/daily-budget":{"patch":{"tags":["Campaigns"],"summary":"Set daily budget for all of a brand's campaigns","description":"Proxy to campaign-service PATCH /brands/{brandId}/daily-budget. Sets dailyBudgetCents on EVERY sales campaign of the brand at once — the brand-page propagation lever: when a customer edits their daily budget on the brand page it flows down to the brand's campaign(s). Distinct from PATCH /v1/brands/{brandId}/daily-budget (billing-service brand spend cap). Body { dailyBudgetCents } (integer cents >= 0, or null to clear each campaign's own budget so they fall back to the brand daily budget). Identity headers (x-org-id, x-user-id, x-run-id) are forwarded. Body + response shapes are owned by campaign-service; its 4xx validation errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBrandCampaignsDailyBudgetRequest"}}}},"responses":{"200":{"description":"Per-campaign daily budgets updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBrandCampaignsDailyBudgetResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BrandsByBrandIdCampaignsDailyBudget"}},"/v1/campaigns/{id}/stop":{"post":{"tags":["Campaigns"],"summary":"Stop a campaign","description":"Stop a running campaign","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Stopped campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopCampaignResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1CampaignsByIdStop"}},"/v1/runs":{"get":{"tags":["Runs"],"summary":"List runs","description":"Transparent proxy to runs-service GET /v1/runs. Supports all runs-service query params: campaignId, brandId, userId, workflowSlug, featureSlug, serviceName, taskName, status, parentRunId, startedAfter, startedBefore, limit, offset. Results are sorted by startedAt DESC (most recent first). Each item is a run with own-cost totals only; for the per-cost-name breakdown of a single run, call GET /v1/runs/{id}.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"workflowSlug","in":"query"},{"schema":{"type":"string"},"required":false,"name":"featureSlug","in":"query"},{"schema":{"type":"string"},"required":false,"name":"serviceName","in":"query"},{"schema":{"type":"string"},"required":false,"name":"taskName","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"parentRunId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"startedAfter","in":"query"},{"schema":{"type":"string"},"required":false,"name":"startedBefore","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of runs with own-cost totals. One item per run; per-cost-name breakdown is on GET /v1/runs/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRunsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Runs"}},"/v1/campaigns/{id}/stats":{"get":{"tags":["Campaigns"],"summary":"Get campaign stats","description":"Get campaign statistics (leads served/buffered/skipped, apollo metrics, emails sent/opened/clicked, reply aggregates, etc.)","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Aggregated campaign statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CampaignsByIdStats"}},"/v1/campaigns/stats":{"get":{"tags":["Campaigns"],"summary":"Get stats for all campaigns (grouped)","description":"Aggregates stats from email-gateway, lead-service, content-generation, and runs-service using groupBy=campaignId. Returns one entry per campaign. Supports filtering by brandId, workflowSlug, featureSlug, workflowDynastySlug, or featureDynastySlug. Replaces the old POST /v1/campaigns/stats/batch endpoint.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact feature slug"},"required":false,"description":"Filter by exact feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by feature dynasty slug (resolved to all versioned slugs)","name":"featureDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Per-campaign aggregated statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignsBatchStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CampaignsStats"}},"/v1/campaigns/{id}/emails":{"get":{"tags":["Campaigns"],"summary":"Get campaign emails","description":"Get all generated emails for a campaign across all runs, with generation cost data","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Campaign emails with generation run data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignEmailsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CampaignsByIdEmails"}},"/v1/keys":{"get":{"tags":["Keys"],"summary":"List provider keys","description":"List provider keys for the organization.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of provider keys (masked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeysResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Keys","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"post":{"tags":["Keys"],"summary":"Upsert a provider key","description":"Store or update a provider API key for the organization.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertKeyRequest"}}}},"responses":{"200":{"description":"Key stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertKeyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Keys","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/keys/{provider}":{"delete":{"tags":["Keys"],"summary":"Delete a provider key","description":"Remove a provider key for the organization.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Provider name"},"required":true,"description":"Provider name","name":"provider","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Key deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteKeyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1KeysByProvider"}},"/v1/keys/sources":{"get":{"tags":["Keys"],"summary":"List key source preferences","description":"List all explicit key source preferences for the organization. Providers not listed default to 'platform'.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Key source preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeySourcesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1KeysSources","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/keys/{provider}/source":{"get":{"tags":["Keys"],"summary":"Get key source preference","description":"Get the current key source preference for a provider. Returns 'platform' with isDefault=true if no explicit preference is set.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Provider name"},"required":true,"description":"Provider name","name":"provider","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Key source preference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetKeySourceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1KeysByProviderSource"},"put":{"tags":["Keys"],"summary":"Set key source preference","description":"Set whether the org uses its own key or the platform key for a given provider. If switching to 'org', an org key must already be stored.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Provider name"},"required":true,"description":"Provider name","name":"provider","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetKeySourceRequest"}}}},"responses":{"200":{"description":"Key source preference saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetKeySourceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request or no org key stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1KeysByProviderSource"}},"/v1/keys/provider-requirements":{"post":{"tags":["Keys"],"summary":"Query provider requirements","description":"Given a list of service endpoints, returns which third-party providers each endpoint needs. Used to determine which keys are required before execution.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderRequirementsRequest"}}}},"responses":{"200":{"description":"Provider requirements for the given endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderRequirementsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1KeysProviderRequirements","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/api-keys":{"get":{"tags":["Authentication"],"summary":"List API keys","description":"List all API keys for the organization","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ApiKeys","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"post":{"tags":["Authentication"],"summary":"Create an API key","description":"Create a new API key for your organization. This is the recommended way to authenticate with the API.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"200":{"description":"Created API key (includes the full key — only shown once)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ApiKeys","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/api-keys/{id}":{"delete":{"tags":["Authentication"],"summary":"Revoke an API key","description":"Delete/revoke an API key by ID","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"API key ID"},"required":true,"description":"API key ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiKeyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1ApiKeysById"}},"/v1/api-keys/session":{"post":{"tags":["Authentication"],"summary":"Get or create session API key","description":"Get or create a short-lived session API key for Foxy chat integration","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Session API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionApiKeyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ApiKeysSession","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/leads/search":{"post":{"tags":["Leads"],"summary":"Search for leads","description":"Search for leads using Apollo-compatible filters (titles, locations, industries, company size)","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSearchRequest"}}}},"responses":{"200":{"description":"Lead search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSearchResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1LeadsSearch","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/leads":{"get":{"tags":["Leads"],"summary":"List leads","description":"Pass-through to lead-service GET /orgs/leads. Filter by brandId and/or campaignId (at least one required). The whole query string is forwarded to lead-service verbatim: the parameters listed here are the ones documented today, not a whitelist — any other filter lead-service accepts can be sent and reaches it unchanged. Each lead is a LeadDetail with the canonical FullLead payload under `lead` (lead-service v0.13.4+). Refer to lead-service openapi.json for the exact query parameters and response shape — api-service forwards both untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID filter"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Campaign ID filter"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Max results to return"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Offset for pagination"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Projection view forwarded to lead-service (e.g. `basic` for a slim payload)"},"required":false,"name":"view","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Leads as returned by lead-service GET /orgs/leads (LeadDetail[] under `leads`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandLeadsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing brandId or campaignId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Leads"}},"/v1/leads/stats":{"get":{"tags":["Leads"],"summary":"Lead counts, without the leads","description":"Pass-through to lead-service GET /orgs/stats. Returns a brand's (or campaign's, or the whole org's) lead counts — the total plus the split by lifecycle state — with no lead rows in the response, so a surface that renders a count badge does not have to download the lead list to get one integer. The whole query string is forwarded to lead-service verbatim: the parameters listed here are the ones documented today, not a whitelist — any other filter or `groupBy` dimension lead-service accepts can be sent and reaches it unchanged. Org scope comes from the authenticated identity, not from the query. Refer to lead-service openapi.json for the exact parameters and response shape — api-service forwards both untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID filter"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string","description":"Campaign ID filter"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Return one count row per value of this dimension (e.g. `campaignId`, `brandId`, `audienceId`) instead of a flat total."},"required":false,"name":"groupBy","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Lead counts as returned by lead-service GET /orgs/stats. Flat (`totalLeads`, `byOutreachStatus`, `repliesDetail`, `buffered`, `skipped`, `claimed`) without `groupBy`, or `{ groups: [...] }` with it. lead-service owns this shape; api-service forwards it byte-identical.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1LeadsStats"}},"/v1/leads/{id}":{"get":{"tags":["Leads"],"summary":"Read one lead's full record","description":"Pass-through to lead-service GET /orgs/leads/{id}. Returns the full record of a SINGLE lead — the same object GET /v1/leads emits for that row — wrapped as `{ leadDetail }` rather than a one-element list. `id` is the `id` a row of GET /v1/leads already carries, so a caller needs nothing it did not already receive from the list: take the slim list for the table, then ask for depth one row at a time instead of holding the full projection for a whole brand. The whole query string is forwarded to lead-service verbatim: the parameters listed here are the ones documented today, not a whitelist. `brandId` / `campaignId` mean exactly what they mean on the list — which scope the delivery overlay answers for. The read is org-scoped downstream: a lead outside the caller's org is a 404, indistinguishable from one that does not exist. Refer to lead-service openapi.json for the exact response shape — api-service forwards it untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The `id` of a lead as returned by GET /v1/leads. A non-uuid value is a 400 from lead-service."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Delivery-overlay scope, same as on the list. A lead that does not belong to this brand is a 404."},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Campaign scope for the delivery overlay, same as on the list."},"required":false,"name":"campaignId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"The lead's full record as returned by lead-service (`{ leadDetail }`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDetailResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid lead id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"No such lead in this caller's org (or brand, when brandId is given)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1LeadsById"}},"/v1/leads/{id}/step-statements":{"get":{"tags":["Leads"],"summary":"Everything known about every funnel step of one lead","description":"Pass-through to lead-service GET /orgs/leads/{id}/step-statements. One entry per step of the outcome vocabulary, always all of them: each is either an outcome (with the source that reported or stated it), a `never` a human stated, or pending. Pending is named by lead-service rather than inferred from an absent count — an outcome that has not arrived and a lead that is dead at that step used to read the same. `id` is the `id` a row of GET /v1/leads already carries, so the panel listing the lead needs nothing new. The read is org-scoped downstream. Refer to lead-service openapi.json for the exact response shape — api-service forwards it untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The `id` of a lead as returned by GET /v1/leads."},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Per-step state for this lead, as returned by lead-service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadStepStatementsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid lead id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"No such lead in this caller's org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1LeadsByIdStepStatements"},"post":{"tags":["Leads"],"summary":"State by hand what happened to one lead at one funnel step (or that it never will)","description":"Pass-through to lead-service POST /orgs/leads/{id}/step-statements. Records, by hand, what happened to this lead at one step of its campaign's sales funnel. An `outcome` is written to the same conversion ledger every consumer already counts, so the brand's outcome counts move on the next read with nothing to change downstream; a `never` goes to a store no count reads, so it can never move a number — it exists so a reader can tell a lead that is DEAD at a step from one still PENDING. The body is forwarded VERBATIM: this gateway does not re-declare or narrow lead-service's request shape, and lead-service owns which statements are legal, including its refusals (a `never` on a step that already happened, a value attached to a `never`, an unparseable timestamp). Those refusals reach the caller with their own status and body so a surface can say WHY a statement was refused. The caller's org AND user identity are forwarded, because lead-service records who stated the fact and attributes the statement to the caller's own campaign row. Refer to lead-service openapi.json for the exact request and response shapes.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The `id` of a lead as returned by GET /v1/leads."},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadStepStatementRequest"}}}},"responses":{"201":{"description":"The statement as recorded by lead-service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadStepStatementResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid statement (lead-service states the reason)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"No such lead in this caller's org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"The statement contradicts one already recorded for this step","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1LeadsByIdStepStatements"}},"/v1/qualify":{"post":{"tags":["Qualify"],"summary":"Qualify an email reply","description":"Uses AI to qualify/classify an inbound email reply (interested, not interested, out-of-office, etc.)","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualifyRequest"}}}},"responses":{"200":{"description":"Qualification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualifyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Qualify","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/scraping/scrape":{"post":{"tags":["Scraping"],"summary":"Scrape a URL","description":"Transparent proxy to scraping-service POST /scrape. Body is forwarded as-is.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeRequest"}}}},"responses":{"200":{"description":"Scrape result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ScrapingScrape","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/scraping/scrape/by-url":{"get":{"tags":["Scraping"],"summary":"Get scrape result by URL","description":"Transparent proxy to scraping-service GET /scrape/by-url","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"URL to look up"},"required":true,"description":"URL to look up","name":"url","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Cached scrape result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeByUrlResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing url param","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ScrapingScrapeByUrl"}},"/v1/brands":{"get":{"tags":["Brand"],"summary":"List brands","description":"Get all brands for the organization","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of brands","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrandsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Brands","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"post":{"tags":["Brand"],"summary":"Upsert brand","description":"Upsert a brand from a URL. Returns the brandId.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUpsertRequest"}}}},"responses":{"200":{"description":"Brand upserted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertBrandResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Brands","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/brands/by-ids":{"get":{"tags":["Brand"],"summary":"Batch lookup brands by ID","description":"Resolve multiple brands in a single round-trip. Pass UUIDs as a comma-separated list in the `ids` query param. Proxies to brand-service `GET /internal/brands?ids=...`. Missing ids are silently omitted from the response. If the caller exceeds the upstream per-request cap, brand-service returns 400 and the error is propagated verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Comma-separated UUIDs"},"required":true,"description":"Comma-separated UUIDs","name":"ids","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Batch brand lookup result (passthrough — brand-service owns the shape)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchBrandsByIdsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing ids query param or upstream cap exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIds"}},"/v1/brands/{id}":{"get":{"tags":["Brand"],"summary":"Get a brand","description":"Get a single brand by ID","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrandResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsById"},"patch":{"tags":["Brand"],"summary":"Attach a website to an existing no-website brand","description":"Proxy to brand-service PATCH /orgs/brands/{id}. Attaches a website to an existing no-website brand (sets brands.url + domain); the next post-cache-expiry field extraction re-sources from the site automatically. Body { url } + response shape ({ brandId, domain, name, url }) are owned by the downstream service; its 4xx validation errors and 409 domain-conflict propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachBrandWebsiteRequest"}}}},"responses":{"200":{"description":"Website attached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachBrandWebsiteResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid URL (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Domain already in use by another brand (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BrandsById"}},"/v1/brands/extract-fields":{"post":{"tags":["Brand"],"summary":"Extract fields from brand(s)","description":"Multi-brand field extraction. Pass brandIds in the request body — api-service sets x-brand-id header and proxies to brand-service. Send fields you want with a key and description, and brand-service extracts them via AI. Results are cached 30 days per field per brand. Pass brandIds in the request body — api-service sets x-brand-id header and proxies to brand-service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractFieldsFromHeaderRequest"}}}},"responses":{"200":{"description":"Extracted field results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractFieldsFromHeaderResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing x-brand-id header or Anthropic API key not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsExtractFields","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/brands/{id}/extracted-fields":{"get":{"tags":["Brand"],"summary":"List extracted fields for a brand","description":"Lists all previously extracted and cached fields for a brand.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Cached extracted fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedFieldsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdExtractedFields"}},"/v1/brands/extract-images":{"post":{"tags":["Brand"],"summary":"Extract images from brand(s)","description":"Multi-brand image extraction. Pass brandIds in the request body — api-service sets x-brand-id header and proxies to brand-service. Pass brandIds in the request body — api-service sets x-brand-id header and proxies to brand-service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractImagesFromHeaderRequest"}}}},"responses":{"200":{"description":"Extracted image results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractImagesMultiBrandResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error or Anthropic API key not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsExtractImages","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/brands/{id}/extracted-images":{"get":{"tags":["Brand"],"summary":"List extracted images for a brand","description":"Lists all previously extracted and cached images for a brand. Supports ?campaignId= query param to filter by campaign.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"schema":{"type":"string","description":"Filter by campaign ID"},"required":false,"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Cached extracted images","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedImagesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdExtractedImages"}},"/v1/brands/{id}/runs":{"get":{"tags":["Brand"],"summary":"Get brand runs","description":"Get extraction runs for a brand (extract-fields, icp-extraction) enriched with cost data","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand extraction runs with cost data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRunsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdRuns"}},"/v1/brands/{id}/sales-economics-effective":{"get":{"tags":["Brand"],"summary":"Get a brand's effective sales conversion-economics","description":"Proxy to brand-service GET /orgs/brands/{id}/sales-economics-effective. Returns the brand's effective sales conversion-economics (lifetimeRevenueUsd, replyToMeetingPct, visitToMeetingPct, meetingToClosePct, visitToClosePct): the brand's own saved economics, or the org's cross-brand average when the brand has saved nothing, plus a `source` field (\"user\" | \"cross-brand-average\" | null). Used to prefill the new-campaign sales-economics inputs. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Effective sales economics (or null)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesEconomicsEffectiveResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdSalesEconomicsEffective"}},"/v1/brands/{id}/sales-economics":{"get":{"tags":["Brand"],"summary":"Get a brand's sales conversion-economics metrics","description":"Proxy to brand-service GET /orgs/brands/{id}/sales-economics. Returns the brand's 5 sales conversion-economics metrics (lifetimeRevenueUsd, replyToMeetingPct, visitToMeetingPct, meetingToClosePct, visitToClosePct) plus updatedAt, or { salesEconomics: null } when unset. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Sales economics (or null when unset)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesEconomicsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdSalesEconomics"},"put":{"tags":["Brand"],"summary":"Save a brand's sales conversion-economics metrics","description":"Proxy to brand-service PUT /orgs/brands/{id}/sales-economics. Saves the brand's 5 sales conversion-economics metrics (lifetimeRevenueUsd, replyToMeetingPct, visitToMeetingPct, meetingToClosePct, visitToClosePct — all required). Body + response shapes are owned by the downstream service; its 4xx validation errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesEconomicsRequest"}}}},"responses":{"200":{"description":"Sales economics saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesEconomicsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdSalesEconomics"}},"/v1/brands/{id}/sales-funnels":{"get":{"tags":["Brand"],"summary":"Get the sales funnels a brand has declared it sells through","description":"Proxy to brand-service GET /orgs/brands/{id}/sales-funnels. Returns { declared, funnels }: the funnels the brand declared, in catalogue order, each with its own conversion rates, lifetime revenue, landing page and booking link. Read `declared` BEFORE `funnels` — `declared: true` with an empty list means the brand STATED it sells through none, while `declared: false` means it has never told us anything. Nothing is defaulted: a value the brand never declared reads null, which never means zero. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"The declared funnels (possibly empty)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid brand ID format (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdSalesFunnels"},"put":{"tags":["Brand"],"summary":"State the whole set of funnels a brand sells through","description":"Proxy to brand-service PUT /orgs/brands/{id}/sales-funnels. States the WHOLE set at once (body { funnelKeys }): exactly these funnels, no others. Funnels already in the set keep the economics they were priced with; funnels dropped from it lose their declaration and their economics together. `{ \"funnelKeys\": [] }` is legal and is the only way a brand can state it sells through NOTHING. The set is validated whole before anything is written, so a rejected set leaves nothing half-applied. Body + response shapes are owned by the downstream service; its 4xx propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelsSetRequest"}}}},"responses":{"200":{"description":"The stated set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid brand ID, unknown funnel key, or a website-led funnel on a brand with no website (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdSalesFunnels"}},"/v1/brands/{id}/sales-funnels/{funnelKey}":{"put":{"tags":["Brand"],"summary":"Declare a sales funnel and write its economics","description":"Proxy to brand-service PUT /orgs/brands/{id}/sales-funnels/{funnelKey}. Declares that the brand sells through this funnel and writes what the body carries of its economics. Idempotent — the declaration IS the row, and a body with no fields declares the funnel without pricing it yet. PARTIAL: an omitted field is left exactly as stored, an explicit null CLEARS the value back to never-declared. brand-service rejects a rate outside this funnel's own chain, a destination the funnel has no use for, an off-domain page destination, and a website-led funnel on a brand with no website; the gateway adds no validation of its own. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"schema":{"type":"string","description":"Funnel key: reply_meeting | visit_meeting | visit_signup | visit_form"},"required":true,"description":"Funnel key: reply_meeting | visit_meeting | visit_signup | visit_form","name":"funnelKey","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelRequest"}}}},"responses":{"200":{"description":"The declared funnel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid brand ID or funnel key, a rate outside this funnel's chain, a destination the funnel has no use for, or a website-led funnel on a brand with no website (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdSalesFunnelsByFunnelKey"},"delete":{"tags":["Brand"],"summary":"Undeclare a sales funnel","description":"Proxy to brand-service DELETE /orgs/brands/{id}/sales-funnels/{funnelKey}. The brand no longer sells through this funnel, and removing the declaration removes its economics with it. Idempotent — undeclaring a funnel that was never declared is a 200 with the unchanged set. Does NOT un-state the set: a brand that removes its LAST funnel keeps `declared: true`, because it has stated it sells through none. Returns the set that is left. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"schema":{"type":"string","description":"Funnel key: reply_meeting | visit_meeting | visit_signup | visit_form"},"required":true,"description":"Funnel key: reply_meeting | visit_meeting | visit_signup | visit_form","name":"funnelKey","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"The funnels still declared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesFunnelsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid brand ID format or unknown funnel key (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1BrandsByIdSalesFunnelsByFunnelKey"}},"/v1/brands/{id}/click-destination":{"put":{"tags":["Brand"],"summary":"Set a brand's outreach click-destination URL","description":"Proxy to brand-service PUT /orgs/brands/{id}/click-destination. Sets the per-brand page outreach clicks should land on (default = brand domain, user-overridable). Body + response shapes are owned by the downstream service; its 4xx validation errors (incl. 400 on a non-http(s)/invalid URL) propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickDestinationRequest"}}}},"responses":{"200":{"description":"Click destination saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickDestinationResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid click-destination URL (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand not in caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdClickDestination"}},"/v1/brands/{id}/business-context":{"get":{"tags":["Brand"],"summary":"Get a no-website brand's pasted business context","description":"Proxy to brand-service GET /orgs/brands/{id}/business-context. Returns { content: string | null } — the free-form business context used as the field-extraction source for a no-website brand, or null when unset. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Business context (or null when unset)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessContextResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdBusinessContext"},"put":{"tags":["Brand"],"summary":"Save a no-website brand's business context","description":"Proxy to brand-service PUT /orgs/brands/{id}/business-context. Saves the free-form business context field-extraction reads from when the brand has no website (idempotent on brand_id). Large bodies (~up to 1MB) are accepted. Body { content } + response shapes are owned by the downstream service; its 4xx validation errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessContextRequest"}}}},"responses":{"200":{"description":"Business context saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessContextResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdBusinessContext"}},"/v1/brands/{id}/conversion-token":{"get":{"tags":["Brand"],"summary":"Get a brand's conversion-tracking token","description":"Proxy to lead-service GET /orgs/brands/{id}/conversion-token. Returns the brand's per-brand conversion-tracking publishable token and ingest URL ({ token, ingestUrl }) for the website snippet that fires Signup / Meeting Booked events. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Conversion token + ingest URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionTokenResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdConversionToken"}},"/v1/brands/{id}/conversion-token/rotate":{"post":{"tags":["Brand"],"summary":"Rotate a brand's conversion-tracking token","description":"Proxy to lead-service POST /orgs/brands/{id}/conversion-token/rotate. Rotates the brand's per-brand conversion-tracking token and returns the new { token, ingestUrl }. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Rotated conversion token + ingest URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionTokenResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsByIdConversionTokenRotate"}},"/v1/brands/{id}/share-token":{"get":{"tags":["Brand"],"summary":"Get a brand's public share credential","description":"Proxy to brand-service GET /orgs/brands/{id}/share-token. Returns the credential currently letting someone outside the org open a read-only view of this brand, or { token: null } when the brand has never been shared. A READ: it does NOT mint one, so opening a share menu cannot accidentally start sharing a brand. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Current share credential (token null when unshared)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandShareTokenProxyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdShareToken"},"post":{"tags":["Brand"],"summary":"Start sharing a brand, returning its credential","description":"Proxy to brand-service POST /orgs/brands/{id}/share-token. Mints the credential that lets someone outside the org open a read-only view of this brand. Idempotent: a brand already shared gets its EXISTING token back rather than a fresh one, so pressing share twice cannot silently invalidate a link the customer already sent. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Share credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandShareTokenProxyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsByIdShareToken"},"delete":{"tags":["Brand"],"summary":"Stop sharing a brand","description":"Proxy to brand-service DELETE /orgs/brands/{id}/share-token. Revokes the credential so the public link stops resolving. Idempotent — a brand that was not shared is already in the requested end state. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Whether a link existed and was removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandShareTokenProxyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1BrandsByIdShareToken"}},"/v1/brands/{id}/share-token/rotate":{"post":{"tags":["Brand"],"summary":"Rotate a brand's public share credential","description":"Proxy to brand-service POST /orgs/brands/{id}/share-token/rotate. Replaces the credential, so the previous link stops working immediately — this is how a customer takes back a link already in someone else's hands. Downstream 404s a brand that was never shared rather than minting one, and that propagates verbatim. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"New share credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandShareTokenProxyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"Brand does not belong to the caller's org (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found, or brand is not shared (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsByIdShareTokenRotate"}},"/v1/share-tokens/resolve":{"post":{"tags":["Brand"],"summary":"Resolve a brand share credential","description":"Proxy to brand-service POST /internal/share-tokens/resolve. Present the credential alone and learn which brand it refers to, plus that brand's public-safe payload. Authenticated but NOT org-scoped, uniquely among the brand routes: the caller is a trusted server-side renderer holding a platform key that has no org context YET, and resolving the credential is precisely how it learns which brand it is rendering, so requiring one here would make the route unusable for its only purpose. The credential travels in the BODY, matching downstream: a share credential in a URL lands in access logs and proxy traces. Downstream 404s unknown, revoked and rotated-away credentials alike, and that propagates verbatim. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveShareTokenProxyRequest"}}}},"responses":{"200":{"description":"The brand the credential refers to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandShareTokenProxyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Share token not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ShareTokensResolve","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/brands/{id}/icp/suggest":{"post":{"tags":["Brand"],"summary":"Suggest one natural-language ICP for a brand","description":"Proxy to brand-service POST /orgs/brands/{id}/icp/suggest. Returns one short, plain-language ICP line ({ icp }). Optional body { existingIcps?: string[] } makes it return a distinct, complementary ICP. Body + response shapes are owned by the downstream service — passthrough only.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IcpSuggestRequest"}}}},"responses":{"200":{"description":"ICP suggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IcpSuggestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"402":{"description":"Insufficient credits (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"422":{"description":"Empty brand profile (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsByIdIcpSuggest"}},"/v1/brands/{id}/user-fields":{"get":{"tags":["Brand"],"summary":"Get a brand's confirmed user-facing fields","description":"Proxy to brand-service GET /orgs/brands/{id}/user-fields. Returns { fields: { <key>: { value, provenance } } } for the 7 user-facing keys (confirmed value wins with provenance `confirmed`, else the most-recent non-expired auto-extract prefill with provenance `suggested`). Response shape is owned by the downstream service — passthrough only. Any query string is forwarded verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"User-facing fields with provenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUserFieldsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdUserFields"},"put":{"tags":["Brand"],"summary":"Confirm (upsert) a brand's user-facing fields","description":"Proxy to brand-service PUT /orgs/brands/{id}/user-fields. Body { fields: { <key>: value } } upserts confirmed (durable) values; returns the updated view in the same shape as GET. Body + response shapes are owned by the downstream service; its 4xx (incl. 400 on an unknown key) propagate verbatim — passthrough only.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUserFieldsRequest"}}}},"responses":{"200":{"description":"Updated user-facing fields with provenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUserFieldsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error / unknown key (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByIdUserFields"}},"/v1/brands/{id}/transfer":{"post":{"tags":["Brand"],"summary":"Transfer a brand to another org","description":"Transfer a brand and all its associated solo-brand data to a different organization. The requesting user must be a member of both the source and target orgs. Brand-service orchestrates the transfer across all services. Co-branding rows (multiple brand IDs) are not transferred.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferBrandRequest"}}}},"responses":{"200":{"description":"Transfer completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferBrandResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing targetOrgId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"User is not a member of the target org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BrandsByIdTransfer"}},"/v1/brands/{id}/transfers":{"get":{"tags":["Brand"],"summary":"Get transfer history for a brand","description":"Returns the audit log of all transfers for a given brand, including per-service results.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Transfer history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransferHistoryResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByIdTransfers"}},"/v1/brand-transfers/outgoing":{"get":{"tags":["Brand"],"summary":"Get outgoing brand transfers for the current org","description":"Returns transfers where the current org is the source (brand was transferred out).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Outgoing transfer history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutgoingBrandTransferResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandTransfersOutgoing"}},"/v1/brand-transfers/incoming":{"get":{"tags":["Brand"],"summary":"Get incoming brand transfers for the current org","description":"Returns transfers where the current org is the target (brand was transferred in).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Incoming transfer history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingBrandTransferResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandTransfersIncoming"}},"/v1/email-gateway/stats":{"get":{"tags":["Email Gateway"],"summary":"Get email delivery stats","description":"Get broadcast delivery statistics from email-gateway. Filter by brandId, campaignId, workflowSlugs, featureSlugs, workflowDynastySlug, or featureDynastySlug.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign ID"},"required":false,"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by workflow slugs (comma-separated, e.g. 'slug-v1,slug-v2')"},"required":false,"description":"Filter by workflow slugs (comma-separated, e.g. 'slug-v1,slug-v2')","name":"workflowSlugs","in":"query"},{"schema":{"type":"string","description":"Filter by feature slugs (comma-separated, e.g. 'feature-v1,feature-v2')"},"required":false,"description":"Filter by feature slugs (comma-separated, e.g. 'feature-v1,feature-v2')","name":"featureSlugs","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by feature dynasty slug (resolved to all versioned slugs)","name":"featureDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Delivery statistics (broadcast only)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailGatewayStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1EmailGatewayStats"}},"/v1/runs/stats/costs":{"get":{"tags":["Runs"],"summary":"Get cost stats from runs-service","description":"Get cost statistics grouped by a dimension. Supports groupBy=brandId, costName, campaignId, serviceName, workflowDynastySlug. Filter by brandId, campaignId, taskName, workflowSlug, featureSlug, workflowDynastySlug, startedAfter, startedBefore.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Grouping dimension: brandId, costName, campaignId, serviceName, workflowDynastySlug"},"required":true,"description":"Grouping dimension: brandId, costName, campaignId, serviceName, workflowDynastySlug","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign ID"},"required":false,"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by task name (e.g. lead-serve)"},"required":false,"description":"Filter by task name (e.g. lead-serve)","name":"taskName","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact feature slug"},"required":false,"description":"Filter by exact feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by run startedAt >= this ISO date-time"},"required":false,"description":"Filter by run startedAt >= this ISO date-time","name":"startedAfter","in":"query"},{"schema":{"type":"string","description":"Filter by run startedAt < this ISO date-time"},"required":false,"description":"Filter by run startedAt < this ISO date-time","name":"startedBefore","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Cost stats grouped by the requested dimension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsCostStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing groupBy parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1RunsStatsCosts"}},"/v1/events":{"get":{"tags":["Runs"],"summary":"List run events for the authenticated org","description":"Transparent proxy to runs-service GET /v1/events. orgId is injected from the auth context — never trusted from client query. Use this endpoint to render per-campaign log views in the dashboard. Events are ordered by createdAt DESC.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Filter to a single campaign"},"required":false,"description":"Filter to a single campaign","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by brand ID (single UUID)"},"required":false,"description":"Filter by brand ID (single UUID)","name":"brandId","in":"query"},{"schema":{"type":"string","enum":["info","warn","error"],"description":"Filter by event severity"},"required":false,"description":"Filter by event severity","name":"level","in":"query"},{"schema":{"type":"string","description":"Filter by emitting service name"},"required":false,"description":"Filter by emitting service name","name":"service","in":"query"},{"schema":{"type":"string","description":"Filter by workflow slug"},"required":false,"description":"Filter by workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug"},"required":false,"description":"Filter by feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by event slug(s) — comma-separated, e.g. send-start,generate-start"},"required":false,"description":"Filter by event slug(s) — comma-separated, e.g. send-start,generate-start","name":"event","in":"query"},{"schema":{"type":"string","description":"Page size — forwarded as-is to runs-service"},"required":false,"description":"Page size — forwarded as-is to runs-service","name":"limit","in":"query"},{"schema":{"type":"string","description":"Page offset — forwarded as-is to runs-service"},"required":false,"description":"Page offset — forwarded as-is to runs-service","name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of run events for the org, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEventsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Organization context required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Events"}},"/v1/scraping/scrape/{id}":{"get":{"tags":["Scraping"],"summary":"Get scrape result by ID","description":"Transparent proxy to scraping-service GET /scrape/:id","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Scrape ID"},"required":true,"description":"Scrape ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Scrape result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeResultResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ScrapingScrapeById"}},"/v1/workflows":{"get":{"tags":["Workflows"],"summary":"List workflows","description":"List available workflows from the workflow-service. Supports filtering by exact versioned slugs or dynasty slugs (lineage match). Use featureDynastySlug/workflowDynastySlug to match all versions in a lineage, or featureSlug/workflowSlug for exact version match.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter workflows by human expert ID","example":"human-uuid-123"},"required":false,"description":"Filter workflows by human expert ID","name":"humanId","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolves to all versioned slugs in the lineage)","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature dynasty slug (resolves to all versioned slugs in the lineage)","name":"featureDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact versioned workflow slug","example":"sales-email-cold-outreach-sienna-v3"},"required":false,"description":"Filter by exact versioned workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (exact match on dynasty_slug column)","example":"sales-email-cold-outreach-sienna"},"required":false,"description":"Filter by workflow dynasty slug (exact match on dynasty_slug column)","name":"workflowDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Workflows"},"post":{"tags":["Workflows"],"summary":"Create a workflow","description":"Create a new workflow with a DAG definition. The workflow is deployed to the execution engine and can then be executed via POST /v1/workflows/{id}/execute.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateWorkflowRequest"},{"properties":{}}]}}}},"responses":{"201":{"description":"Workflow created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateWorkflowResponse"},{"properties":{}}]}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Workflows","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/workflows/{id}":{"get":{"tags":["Workflows"],"summary":"Get a workflow","description":"Get a single workflow with full DAG definition","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Workflow with DAG","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkflowResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowsById"},"put":{"tags":["Workflows"],"summary":"Update a workflow","description":"The single endpoint for modifying a workflow. Behavior depends on what you send:\n\n**Metadata only** (no `dag` in body): updates description/tags in-place. Returns 200 with `_action: 'updated'`.\n\n**DAG with same signature**: the DAG structure hasn't changed (e.g. only config tweaks that don't affect the hash). Updates in-place. Returns 200 with `_action: 'updated'`.\n\n**DAG with new signature**: creates a new workflow in a new dynasty (fork). The original workflow is kept active unless its entire dynasty has zero campaign runs, in which case it is deprecated. Returns 201 with `_action: 'forked'`, plus `_forkedFromName`, `_forkedFromId`, and `_sourceDynastyDeprecated`.\n\nReturns 409 if an active workflow with the same DAG signature already exists, with `existingWorkflowId` and `existingWorkflowSlug` in the response body.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowRequest"}}}},"responses":{"200":{"description":"Updated in-place (`_action: \"updated\"`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"201":{"description":"Forked — new workflow created because the DAG signature changed (`_action: \"forked\"`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkedWorkflowResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Conflict — an active workflow with the same DAG signature already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowConflictResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1WorkflowsById"}},"/v1/workflows/create":{"post":{"tags":["Workflows"],"summary":"Create a workflow dynasty","description":"Uses AI to generate a new workflow DAG from a natural language description. The generated workflow is validated and deployed as a new dynasty.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRequest"}}}},"responses":{"200":{"description":"Created and deployed workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"422":{"description":"Could not generate a valid DAG","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WorkflowsCreate","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/workflows/upgrade":{"post":{"tags":["Workflows"],"summary":"Upgrade a workflow within its dynasty","description":"Uses AI to upgrade an existing workflow identified by workflowSlug. The upgrade is validated and deployed as a new revision within the same dynasty.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeWorkflowRequest"}}}},"responses":{"200":{"description":"Upgraded workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeWorkflowResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow slug not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"422":{"description":"Could not generate a valid DAG","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WorkflowsUpgrade","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/workflows/{id}/summary":{"get":{"tags":["Workflows"],"summary":"Get workflow summary","description":"Returns a human-readable summary of a workflow's DAG, including ordered steps and required providers. Useful for showing users what a workflow does without exposing the raw DAG.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Workflow summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSummaryResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowsByIdSummary"}},"/v1/workflows/{id}/key-status":{"get":{"tags":["Workflows"],"summary":"Get key status for a workflow","description":"Compares the workflow's required providers against the org's key configuration, taking into account key source preferences (platform vs org). Providers using platform keys are always ready. Returns which keys are present and which are missing, along with an overall readiness flag.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Key status for the workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowKeyStatusResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowsByIdKeyStatus"}},"/v1/workflows/{id}/validate":{"post":{"tags":["Workflows"],"summary":"Validate a workflow DAG","description":"Validates the workflow's DAG structure and checks template contracts — whether the variables provided by the workflow match those expected by prompt templates. Use after every modification to verify consistency.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WorkflowsByIdValidate"}},"/v1/workflows/dynasty/{workflowDynastySlug}/status":{"put":{"tags":["Workflows"],"summary":"Set workflow dynasty status","description":"Activate or deprecate a workflow dynasty by its stable dynasty slug. Proxied verbatim to workflow-service. Deprecating hides the dynasty from selection; reactivating restores it.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Stable dynasty slug","example":"sales-email-cold-outreach-sienna"},"required":true,"description":"Stable dynasty slug","name":"workflowDynastySlug","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDynastyStatusRequest"}}}},"responses":{"200":{"description":"Updated dynasty status — pass-through from workflow-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDynastyStatusResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow dynasty not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1WorkflowsDynastyByWorkflowDynastySlugStatus"}},"/v1/workflows/{id}/status":{"put":{"tags":["Workflows"],"summary":"Set one workflow version's status","description":"Retire (or un-retire) a SINGLE workflow version by id, as opposed to the whole lineage (`PUT /v1/workflows/dynasty/{workflowDynastySlug}/status`). Proxied verbatim to workflow-service. Deprecating stops that version running and stops it being offered to the pickers; the dynasty's other versions are untouched. Re-activating is refused with 409 when another version of the same dynasty is already active — the upstream body carries `existingWorkflowId` / `existingWorkflowSlug` and reaches the caller field-for-field.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow version id","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"required":true,"description":"Workflow version id","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStatusRequest"}}}},"responses":{"200":{"description":"Updated workflow — pass-through from workflow-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStatusResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Another version of the dynasty is already active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1WorkflowsByIdStatus"}},"/v1/workflows/{id}/execute":{"post":{"tags":["Workflows"],"summary":"Execute a workflow","description":"Start executing a workflow. Returns a run ID that can be polled via GET /v1/workflow-runs/{id} for status and result.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Workflow ID"},"required":true,"description":"Workflow ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteWorkflowRequest"}}}},"responses":{"201":{"description":"Execution started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WorkflowsByIdExecute"}},"/v1/workflow-runs":{"get":{"tags":["Workflow Runs"],"summary":"List workflow runs","description":"List workflow runs with optional filters. Results are scoped to the authenticated org.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by workflow ID","example":"wf-uuid-123"},"required":false,"description":"Filter by workflow ID","name":"workflowId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign ID","example":"campaign-uuid-456"},"required":false,"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolves to all versioned slugs via features-service)","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature dynasty slug (resolves to all versioned slugs via features-service)","name":"featureDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact versioned workflow slug","example":"sales-email-cold-outreach-sienna-v3"},"required":false,"description":"Filter by exact versioned workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (subquery on workflows of the dynasty)","example":"sales-email-cold-outreach-sienna"},"required":false,"description":"Filter by workflow dynasty slug (subquery on workflows of the dynasty)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by status (queued, running, completed, failed, cancelled)","example":"completed"},"required":false,"description":"Filter by status (queued, running, completed, failed, cancelled)","name":"status","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of workflow runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkflowRunsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowRuns"}},"/v1/workflow-runs/{id}":{"get":{"tags":["Workflow Runs"],"summary":"Get a workflow run","description":"Get the current status and result of a workflow execution. If still running, polls the engine for the latest status before responding.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Workflow run ID (UUID)"},"required":true,"description":"Workflow run ID (UUID)","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Workflow run details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkflowRunResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowRunsById"}},"/v1/workflow-runs/{id}/cancel":{"post":{"tags":["Workflow Runs"],"summary":"Cancel a workflow run","description":"Cancel a running or queued workflow execution.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Workflow run ID (UUID)"},"required":true,"description":"Workflow run ID (UUID)","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Run cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelWorkflowRunResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WorkflowRunsByIdCancel"}},"/v1/prompts":{"get":{"tags":["Prompts"],"summary":"Get a prompt template","description":"Returns a prompt template by type from the content-generation service. Includes the template text and its declared variables.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Prompt type to look up (e.g. 'cold-email')"},"required":true,"description":"Prompt type to look up (e.g. 'cold-email')","name":"type","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Prompt template found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing type query parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Prompt not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Prompts"},"put":{"tags":["Prompts"],"summary":"Create a new prompt version","description":"Creates a new version of a prompt template with an auto-incremented type name. For example, sourceType 'cold-email' creates 'cold-email-v2'. The source prompt is never modified.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionPromptRequest"}}}},"responses":{"201":{"description":"New versioned prompt created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Source prompt not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1Prompts","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/campaigns/{id}/stream":{"get":{"tags":["Campaigns"],"summary":"Stream campaign updates (SSE)","description":"Server-Sent Events endpoint that pushes real-time campaign updates (new leads, emails, status changes). Connect with EventSource.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Campaign ID"},"required":true,"description":"Campaign ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"SSE stream of campaign events","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events stream"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CampaignsByIdStream"}},"/v1/activity":{"post":{"tags":["Activity"],"summary":"Track user activity","description":"Records user activity event. Fires a transactional email deduped per user per day.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Activity tracked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Activity","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/chat/sessions/{sessionId}":{"get":{"tags":["Chat"],"summary":"Get chat session history","description":"Read a chat session's stored conversation history by session ID. Lets a client (e.g. the dashboard \"Edit with AI\" panel) restore the visible chat after a page refresh. Read-only — no run tracking, no cost, no writes. Org-scoped: a session that does not exist or belongs to another org returns 404 (existence not leaked across orgs).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"UUID of the chat session to read"},"required":true,"description":"UUID of the chat session to read","name":"sessionId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Session metadata and the full ordered conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionHistoryResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Session not found (invalid, expired, or belonging to another org)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ChatSessionsBySessionId"}},"/v1/chat/config":{"put":{"tags":["Chat"],"summary":"Register chat app config","description":"Register or update app configuration for chat (system prompt). Requires app key authentication.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConfigRequest"}}}},"responses":{"200":{"description":"Config registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatConfigResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"App key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1ChatConfig","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/chat":{"post":{"tags":["Chat"],"summary":"Stream chat response (SSE)","description":"Send a message and receive a streamed AI response via Server-Sent Events (SSE).\n\n**Session lifecycle:**\n- To start a new conversation, **omit `sessionId`**. The first SSE event will be `data: {\"sessionId\":\"<uuid>\"}` — store this ID.\n- To continue a conversation, pass that `sessionId` in subsequent requests.\n- If a provided `sessionId` does not exist or belongs to a different org, the stream returns an error and closes.\n\n**SSE event order:**\nEach `data:` line contains a JSON object. Events arrive in this order:\n\n1. **Session** — `{\"sessionId\":\"<uuid>\"}` (always first)\n2. **Thinking** *(optional)* — `thinking_start` → one or more `thinking_delta` → `thinking_stop`\n3. **Tokens** — `{\"type\":\"token\",\"content\":\"...\"}` streamed incrementally\n4. **Tool calls** *(optional, repeatable)* — `tool_call` followed by `tool_result`, then more thinking/tokens as the AI continues\n5. **Input request** *(optional)* — `input_request` when the AI needs structured user input\n6. **Buttons** *(optional)* — `{\"type\":\"buttons\",\"buttons\":[...]}` with quick-reply options\n7. **Error** *(optional)* — `{\"type\":\"error\",\"message\":\"...\"}` when the model returns an empty response (e.g. context overflow, safety filter). Always followed by `[DONE]`.\n8. **Done** — `\"[DONE]\"` (always last)\n\nSee the SSE event schemas (SSESessionEvent, SSETokenEvent, SSEToolCallEvent, etc.) for exact payload shapes.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageRequest"}}}},"responses":{"200":{"description":"SSE stream of chat events. Each `data:` line is a JSON object matching one of the SSE event schemas (SSESessionEvent, SSETokenEvent, SSEThinkingStartEvent, SSEThinkingDeltaEvent, SSEThinkingStopEvent, SSEToolCallEvent, SSEToolResultEvent, SSEInputRequestEvent, SSEButtonsEvent, SSEErrorEvent), except the final `data: \"[DONE]\"` which is a plain string.","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events stream"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"402":{"description":"Insufficient credits. The organization's credit balance is too low to process this request. Response includes `balance_cents` (current balance) and `required_cents` (minimum needed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Session not found (invalid or expired sessionId), or chat config not registered (register via PUT /v1/chat/config or ensure platform config exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1Chat","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/accounts":{"get":{"tags":["Billing"],"summary":"Get billing account","description":"Get or create the billing account for the organization. If no account exists, one is auto-created with a Stripe customer and $2 trial credit.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Billing account data — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAccountResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BillingAccounts","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/accounts/balance":{"get":{"tags":["Billing"],"summary":"Get account balance","description":"Quick check of available funds and depletion status — pass-through from billing-service.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance info — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BillingAccountsBalance","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/accounts/auto_topup":{"patch":{"tags":["Billing"],"summary":"Configure auto-topup","description":"Enable or update auto-topup settings for the billing account. Requires a payment method on file.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureAutoTopupRequest"}}}},"responses":{"200":{"description":"Auto-topup configured — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureAutoTopupResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"No payment method on file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BillingAccountsAutoTopup","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"delete":{"tags":["Billing"],"summary":"Disable auto-topup","description":"Disable auto-topup for the billing account","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Auto-topup disabled — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableAutoTopupResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1BillingAccountsAutoTopup","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/credits/grants":{"get":{"tags":["Billing"],"summary":"Get the org's own credit-grants ledger","description":"List the credit grants (welcome credit, first-deposit match, staff bonuses, referral credits) for the org in context — powers the customer dashboard 'Gifts received' section. Normal org auth (same tier as GET /v1/billing/accounts); billing-service scopes the response to the caller's x-org-id, so an org reads only its own grants. Transparent proxy to billing-service GET /v1/credits/grants; response owned by the downstream service.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Org grants ledger — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditGrantsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BillingCreditsGrants","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/free-credit-promises":{"get":{"tags":["Billing"],"summary":"Free credits this org is still waiting on","description":"Every outstanding free-credit promise for the org in context: the welcome remainder, plus a promise for each converting referral. Each carries what it is worth, the level of cumulative payments that unlocks it, how far along the org is, and — when the promise exists because someone this org referred converted — which org that was, which the dashboard resolves to a brand through brand-service. An outstanding promise is a promise, not money: it is not part of credited, balance or spendable. Normal org auth (same tier as GET /v1/billing/credits/grants); billing-service scopes the response to the caller's x-org-id, so an org reads only its own promises and the client never names an org. Transparent proxy to billing-service GET /v1/free-credit-promises; response owned by the downstream service.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Outstanding promises — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeCreditPromisesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BillingFreeCreditPromises","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/checkout-sessions":{"post":{"tags":["Billing"],"summary":"Create Stripe checkout session","description":"Create a Stripe checkout session for purchasing credits or setting up a payment method.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequest"}}}},"responses":{"200":{"description":"Checkout session created — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BillingCheckoutSessions","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/portal-sessions":{"post":{"tags":["Billing"],"summary":"Create Stripe portal session","description":"Create a Stripe billing portal session for managing payment methods","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalSessionRequest"}}}},"responses":{"200":{"description":"Portal session created — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalSessionResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"No Stripe customer found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1BillingPortalSessions","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/billing/payments":{"get":{"tags":["Billing"],"summary":"List the org's payment history","description":"Returns every payment (Stripe PaymentIntent / top-up) for the calling org, scoped to the Bearer key's org (no orgId in the request). Sourced from stripe-service GET /internal/payment_intents/by-org/{orgId}. Full set, no pagination. Each PaymentIntent carries id, amount (cents), currency, status, created. Response shape is owned by stripe-service — passthrough.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Stripe PaymentIntent list — pass-through from stripe-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPaymentsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BillingPayments","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/brands/{brandId}/daily-budget":{"get":{"tags":["Billing"],"summary":"Get a brand's daily budget","description":"Proxy to billing-service GET /internal/brands/{brandId}/daily-budget. Returns the brand's current daily spend ceiling (per-day pacing/allocation value, separate from org credit balance/affordability). An unset brand returns { dailyBudgetCents: null }. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand daily budget (dailyBudgetCents null when unset)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyBudgetResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdDailyBudget"},"patch":{"tags":["Billing"],"summary":"Set a brand's daily budget","description":"Proxy to billing-service PATCH /v1/brands/{brandId}/daily-budget. Sets the brand's daily spend ceiling. Body { dailyBudgetCents } (number or decimal string, >= 0; 0 = pause). Identity headers (x-org-id, x-user-id, x-run-id) are forwarded. Body + response shapes are owned by the downstream service; its 4xx validation errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyBudgetRequest"}}}},"responses":{"200":{"description":"Updated brand daily budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyBudgetResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Brand is funded PER FUNNEL — the brand-level write is refused. Status and body are billing's, forwarded field-for-field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BrandsByBrandIdDailyBudget"}},"/v1/brands/{brandId}/funnel-budgets":{"get":{"tags":["Billing"],"summary":"Get a brand's per-funnel daily budgets","description":"Proxy to billing-service GET /v1/brands/{brandId}/funnel-budgets. Returns the calling org's per-funnel daily ceilings for the brand plus the brand-level total. A brand with no per-funnel ceilings returns an empty funnel list. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Per-funnel ceilings + brand total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBudgetsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdFunnelBudgets"},"put":{"tags":["Billing"],"summary":"Set a brand's whole per-funnel daily budget set (atomic)","description":"Proxy to billing-service PUT /v1/brands/{brandId}/funnel-budgets. Writes every per-funnel daily ceiling for this org + brand in one transaction — signup checkout uses this. Body { funnels: [{ funnelKey, dailyBudgetCents }] }; funnel keys, per-funnel minimums and the all-or-nothing semantics are owned by the downstream service, which validates the payload. Its 4xx errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBudgetsRequest"}}}},"responses":{"200":{"description":"Stored per-funnel ceilings + the resulting brand total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBudgetsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1BrandsByBrandIdFunnelBudgets"}},"/v1/brands/{brandId}/funnel-budgets/{funnelKey}":{"patch":{"tags":["Billing"],"summary":"Set one funnel's daily budget for a brand","description":"Proxy to billing-service PATCH /v1/brands/{brandId}/funnel-budgets/{funnelKey}. Sets a single sales funnel's daily spend ceiling — brand Settings changes them one at a time; untouched funnels keep theirs. Body { dailyBudgetCents }. Funnel-key vocabulary and per-funnel minimums are owned by the downstream service; its 4xx errors propagate verbatim.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"schema":{"type":"string","description":"Sales-funnel key — vocabulary owned by billing-service"},"required":true,"description":"Sales-funnel key — vocabulary owned by billing-service","name":"funnelKey","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBudgetRequest"}}}},"responses":{"200":{"description":"Stored per-funnel ceilings + the resulting brand total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBudgetsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BrandsByBrandIdFunnelBudgetsByFunnelKey"}},"/v1/emails":{"get":{"tags":["Emails"],"summary":"List generated emails by brand","description":"List all generated emails across campaigns for a brand. Returns the same enriched shape as GET /campaigns/{id}/emails. Proxies to content-generation-service GET /generations with brandId filter.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required)"},"required":true,"name":"brandId","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Optional campaign ID filter"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Max results to return"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Offset for pagination"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Generated emails with run cost data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmailsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing brandId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Emails"}},"/v1/emails/by-lead/{leadId}":{"get":{"tags":["Emails"],"summary":"Get the generated email for a lead","description":"The generated email (subject + body + follow-up sequence) for a single lead. Transparent proxy to content-generation-service GET /generations/by-lead/{leadId}; body forwarded verbatim. Returns { generation: null } when no email has been generated for the lead yet (a normal empty state, not an error).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Lead ID"},"required":true,"name":"leadId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"The lead's generated email, or null if none exists yet (passthrough — owned by content-generation-service)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailByLeadResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1EmailsByLeadByLeadId"}},"/v1/workflow-examples":{"get":{"tags":["Emails"],"summary":"List example emails for a workflow","description":"Example emails per workflow for the workflow picker — a brand→org→global cascade of past generations. Transparent proxy to content-generation-service GET /generations/examples; body forwarded verbatim. Each example carries the email fields plus scope ('brand'|'org'|'global') and brandName.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Workflow slug (required)"},"required":true,"name":"workflowSlug","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Optional brand ID for the brand-scoped cascade tier"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Max examples to return"},"required":false,"name":"limit","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Example emails (passthrough — owned by content-generation-service)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExamplesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing workflowSlug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WorkflowExamples"}},"/v1/emails/send":{"post":{"tags":["Emails"],"summary":"Send a transactional email","description":"Send a templated transactional email. Uses the org context for template lookup and dedup. Dedup strategy depends on eventType (once-only, daily, product-scoped, or none).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}}},"responses":{"200":{"description":"Email send results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1EmailsSend","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/emails/stats":{"get":{"tags":["Emails"],"summary":"Get email stats","description":"Get aggregated email sending stats for the org. Filterable by eventType, workflowSlug, featureSlug, workflowDynastySlug, or featureDynastySlug.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by event type"},"required":false,"description":"Filter by event type","name":"eventType","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact feature slug"},"required":false,"description":"Filter by exact feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by feature dynasty slug (resolved to all versioned slugs)","name":"featureDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Aggregated email stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionalEmailStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1EmailsStats"}},"/v1/emails/manual-qualifications":{"post":{"tags":["Emails"],"summary":"Set a manual reply qualification for a (campaign, lead) pair","description":"Record a human-set reply classification for a lead in a campaign. Used when Instantly's automatic webhook reply classification fails to detect a reply (e.g. the reply was sent to a non-leurre account that Instantly does not monitor). Idempotent: re-POSTing the same status for the same (campaign, lead) returns `idempotent: true` with the existing row. Transparent proxy to email-gateway → instantly-service; the response shape is owned upstream.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualQualificationCreateRequest"}}}},"responses":{"200":{"description":"Manual qualification recorded (or idempotent no-op)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualQualificationCreateResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error from upstream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"(campaign, lead) not found in caller's org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1EmailsManualQualifications","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"get":{"tags":["Emails"],"summary":"List manual reply qualifications (org-scoped audit history)","description":"Returns the caller-org's manual qualification history, sorted by `qualifiedAt` DESC. Optionally filter by `campaign_id` and/or `email`. Cross-org rows are blocked at the instantly-service layer. Transparent proxy to email-gateway → instantly-service; the response shape is owned upstream.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"Filter by logical campaign id"},"required":false,"description":"Filter by logical campaign id","name":"campaign_id","in":"query"},{"schema":{"type":"string","format":"email","description":"Filter by lead email"},"required":false,"description":"Filter by lead email","name":"email","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Max rows to return (upstream default 200, max 500)"},"required":false,"description":"Max rows to return (upstream default 200, max 500)","name":"limit","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of manual qualifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualQualificationListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1EmailsManualQualifications"}},"/v1/emails/templates":{"put":{"tags":["Emails"],"summary":"Deploy email templates","description":"Idempotent upsert of email templates. Safe to call on every cold start. Templates support {{variable}} interpolation from metadata passed at send time.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployEmailTemplatesRequest"}}}},"responses":{"200":{"description":"Templates deployed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployTemplatesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1EmailsTemplates","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/stripe/products/{productId}":{"get":{"tags":["Stripe"],"summary":"Get a Stripe product","description":"Retrieve a Stripe product by ID. Uses the app's Stripe key via key-service. No org context required.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Stripe product ID"},"required":true,"description":"Stripe product ID","name":"productId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Stripe product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeProductResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1StripeProductsByProductId"}},"/v1/stripe/products":{"post":{"tags":["Stripe"],"summary":"Create a Stripe product","description":"Create a new Stripe product. Idempotent — returns existing product if the ID already exists. No org context required (app-level operation).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeProductRequest"}}}},"responses":{"200":{"description":"Created/existing product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeProductResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1StripeProducts","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/stripe/products/{productId}/prices":{"get":{"tags":["Stripe"],"summary":"List prices for a product","description":"List all active prices for a Stripe product. No org context required.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Stripe product ID"},"required":true,"description":"Stripe product ID","name":"productId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of active prices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPricesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1StripeProductsByProductIdPrices"}},"/v1/stripe/prices":{"post":{"tags":["Stripe"],"summary":"Create a Stripe price","description":"Create a new price for a product. Supports one-time and recurring pricing. No org context required (app-level operation).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripePriceRequest"}}}},"responses":{"200":{"description":"Created price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripePriceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1StripePrices","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/stripe/coupons/{couponId}":{"get":{"tags":["Stripe"],"summary":"Get a Stripe coupon","description":"Retrieve a Stripe coupon by ID. No org context required.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Stripe coupon ID"},"required":true,"description":"Stripe coupon ID","name":"couponId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Stripe coupon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCouponResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1StripeCouponsByCouponId"}},"/v1/stripe/coupons":{"post":{"tags":["Stripe"],"summary":"Create a Stripe coupon","description":"Create a new coupon. Supports percent or fixed-amount discounts. No org context required (app-level operation).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCouponRequest"}}}},"responses":{"200":{"description":"Created coupon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCouponResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1StripeCoupons","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/stripe/checkout":{"post":{"tags":["Stripe"],"summary":"Create a Stripe Checkout session","description":"Create a Stripe Checkout session for one-time payment. Returns the checkout URL to redirect the customer.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCheckoutRequest"}}}},"responses":{"200":{"description":"Checkout session with URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCheckoutResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1StripeCheckout","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/stripe/stats":{"get":{"tags":["Stripe"],"summary":"Get Stripe sales stats","description":"Get aggregated sales stats. Filterable by brandId, campaignId, runIds, workflowSlug, featureSlug, workflowDynastySlug, or featureDynastySlug.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by brand ID"},"required":false,"description":"Filter by brand ID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign ID"},"required":false,"description":"Filter by campaign ID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Comma-separated run IDs"},"required":false,"description":"Comma-separated run IDs","name":"runIds","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact feature slug"},"required":false,"description":"Filter by exact feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by feature dynasty slug (resolved to all versioned slugs)","name":"featureDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Aggregated sales stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1StripeStats"}},"/v1/users/resolve":{"post":{"tags":["Users"],"summary":"Resolve external user identity","description":"Map external org/user IDs to internal UUIDs via client-service (idempotent upsert). For anonymous users, generate a UUID as externalUserId — each call with a new ID creates a new user. Calling again with the same IDs updates optional contact fields (email, firstName, etc.).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveUserRequest"}}}},"responses":{"200":{"description":"Resolved identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveUserResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1UsersResolve","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/users":{"get":{"tags":["Users"],"summary":"List users for the authenticated org","description":"Returns paginated users belonging to the caller's organization. Supports optional email filtering and offset-based pagination.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"email","description":"Filter by exact email address"},"required":false,"description":"Filter by exact email address","name":"email","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Max results to return"},"required":false,"description":"Max results to return","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"description":"Pagination offset"},"required":false,"description":"Pagination offset","name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Paginated user list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Users"}},"/v1/platform/services":{"get":{"tags":["Platform"],"summary":"List all platform services","description":"Returns the list of all registered services on the platform. Proxied from api-registry. Useful for service discovery.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of platform services","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformServicesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PlatformServices","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/platform/services/{service}":{"get":{"tags":["Platform"],"summary":"Get OpenAPI spec for a service","description":"Returns the full OpenAPI specification for a specific platform service. Proxied from api-registry. Use this to discover available endpoints, request/response schemas, and more.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Service name (e.g. 'lead', 'campaign', 'workflow')"},"required":true,"description":"Service name (e.g. 'lead', 'campaign', 'workflow')","name":"service","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"OpenAPI specification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiSpec"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Service not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PlatformServicesByService"}},"/v1/content/compose":{"post":{"tags":["Content"],"summary":"Compose a personalized video","description":"Proxy to content-generation-service POST /compose. Composes a personalized video with overlaid text using FFmpeg + sharp, then uploads the result to Vercel Blob.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentComposeRequest"}}}},"responses":{"200":{"description":"Composed video URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentComposeResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ContentCompose","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/content/generate-expert-quote-pitch":{"post":{"tags":["Content"],"summary":"Generate a journalist-quote pitch","description":"Proxy to content-generation-service POST /generate-expert-quote-pitch. Generates a Featured.com-compliant pitch (100-2500 char constraint) for an expert journalist quote opportunity. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateExpertQuotePitchRequest"}}}},"responses":{"200":{"description":"Pitch generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateExpertQuotePitchResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Content-generation length error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1ContentGenerateExpertQuotePitch","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/content/platform-prompts":{"get":{"tags":["Content"],"summary":"Get a prompt template by type","description":"Proxy to content-generation-service GET /platform-prompts?type=<type>. Returns the stored prompt template + its variable metadata so callers can collect inputs before invoking POST /v1/content/generate-expert-quote-pitch. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Prompt type to look up (e.g. expert-quote-pitch)"},"required":true,"name":"type","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Prompt template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformPromptResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Prompt type not found (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ContentPlatformPrompts"}},"/v1/content/prompt-assignments":{"get":{"tags":["Content"],"summary":"Get a feature's assigned generation prompt","description":"Proxy to content-generation-service GET /prompt-assignments?featureSlug=<slug>. Returns the prompt currently assigned to a feature + its variable metadata so the dashboard prompt editor can read the prompt the feature's GENERATE step uses. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug whose assigned prompt to fetch (e.g. pr-expert-quote-opportunities)"},"required":true,"name":"featureSlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Assigned prompt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptAssignmentResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"No assignment for featureSlug (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1ContentPromptAssignments"},"put":{"tags":["Content"],"summary":"Save a feature's generation prompt","description":"Proxy to content-generation-service PUT /prompt-assignments. Saves the feature's generation prompt (forks + reassigns downstream). Body + response shapes are owned by the downstream service; its 400 variable-integrity errors propagate verbatim.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptAssignmentRequest"}}}},"responses":{"200":{"description":"Prompt saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptAssignmentResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Variable-integrity error (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"putV1ContentPromptAssignments","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/platform/llm-context":{"get":{"tags":["Platform"],"summary":"Get LLM-friendly platform overview","description":"Returns a lightweight overview of all platform services (name, description, endpoint count). Proxied from api-registry. Use GET /v1/platform/llm-context/{service} to drill into a specific service's endpoints.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Lightweight service overview for LLM consumption","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmContextResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PlatformLlmContext","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/platform/llm-context/{service}":{"get":{"tags":["Platform"],"summary":"Get LLM-friendly endpoint details for a service","description":"Returns endpoint details for a specific service. Supports filtering by method, path group, or path prefix. Large services (30+ endpoints) auto-group by path prefix. Proxied from api-registry.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Service name"},"required":true,"description":"Service name","name":"service","in":"path"},{"schema":{"type":"string","description":"Filter by HTTP method (e.g. 'POST')"},"required":false,"description":"Filter by HTTP method (e.g. 'POST')","name":"method","in":"query"},{"schema":{"type":"string","description":"Filter by path group (e.g. 'campaigns')"},"required":false,"description":"Filter by path group (e.g. 'campaigns')","name":"group","in":"query"},{"schema":{"type":"string","description":"Filter by path prefix (e.g. '/v1/campaigns')"},"required":false,"description":"Filter by path prefix (e.g. '/v1/campaigns')","name":"pathPrefix","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Endpoint list for the service (flat or grouped depending on size)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmServiceDetailResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Service not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1PlatformLlmContextByService"}},"/v1/features":{"get":{"tags":["Features"],"summary":"List features","description":"List available features with optional filters. Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by status (defaults to 'active')"},"required":false,"description":"Filter by status (defaults to 'active')","name":"status","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of features","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturesListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1Features"}},"/v1/features/{slug}":{"get":{"tags":["Features"],"summary":"Get feature by versioned slug","description":"Get a single feature definition by its slug. Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Exact versioned feature slug"},"required":true,"description":"Exact versioned feature slug","name":"slug","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesBySlug"}},"/v1/features/entities/registry":{"get":{"tags":["Features"],"summary":"Entity type registry","description":"Complete entity type registry — label, icon, pathSuffix, and description for each entity type. Proxied from features-service.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Entity type registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitiesRegistryResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesEntitiesRegistry","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/features/stats/registry":{"get":{"tags":["Features"],"summary":"Stats key registry","description":"Public dictionary of stats keys with label and type per key. Proxied from features-service.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Stats key registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsRegistryResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesStatsRegistry","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/features/stats":{"get":{"tags":["Features"],"summary":"Global stats cross-features","description":"Aggregated stats across all features. Supports groupBy (featureSlug, featureDynastySlug, workflowSlug, workflowDynastySlug, brandId, campaignId) and optional filters. Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Group dimension: featureSlug, featureDynastySlug, workflowSlug, workflowDynastySlug, brandId, campaignId","example":"featureSlug"},"required":false,"description":"Group dimension: featureSlug, featureDynastySlug, workflowSlug, workflowDynastySlug, brandId, campaignId","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Filter by brand UUID","example":"brand-uuid-123"},"required":false,"description":"Filter by brand UUID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign UUID"},"required":false,"description":"Filter by campaign UUID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature slug","name":"featureSlug","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug","example":"sales-email-cold-outreach-sienna-v3"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by feature slug (legacy param name)","example":"pr-cold-email-outreach"},"required":false,"description":"Filter by feature slug (legacy param name)","name":"featureDynastySlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug"},"required":false,"description":"Filter by workflow dynasty slug","name":"workflowDynastySlug","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Global stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesStats"}},"/v1/features/{featureSlug}/prefill":{"post":{"tags":["Features"],"summary":"Prefill feature inputs from brand data","description":"Calls brand-service to extract field values for the feature's inputs. Returns pre-filled values keyed by input key. Requires brandIds in the request body. Use ?format=text for flattened strings, ?format=full for structured values with per-brand breakdown. Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","enum":["text","full"],"description":"Response format: 'text' returns flattened strings, 'full' returns structured values with per-brand breakdown"},"required":false,"description":"Response format: 'text' returns flattened strings, 'full' returns structured values with per-brand breakdown","name":"format","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefillFeatureRequest"}}}},"responses":{"200":{"description":"Pre-filled input values","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrefillFeatureResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Missing or invalid brandIds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1FeaturesByFeatureSlugPrefill"}},"/v1/features/{featureSlug}/pipeline-activity":{"get":{"tags":["Features"],"summary":"Feature pipeline activity","description":"7-day pipeline activity for a brand overview chart. Scoped by brandId, days, and timezone. Proxied from features-service. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list, so any param features-service adds works without an api-service change.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required)","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required)","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Number of days to include","example":"7"},"required":true,"description":"Number of days to include","name":"days","in":"query"},{"schema":{"type":"string","description":"IANA timezone for day bucketing","example":"America/New_York"},"required":true,"description":"IANA timezone for day bucketing","name":"timezone","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature pipeline activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturePipelineActivityResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugPipelineActivity"}},"/v1/features/{featureSlug}/stats":{"get":{"tags":["Features"],"summary":"Feature stats","description":"Stats for a specific feature, groupable by workflowSlug, workflowDynastySlug, brandId, or campaignId. Proxied from features-service. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list, so any param features-service adds works without an api-service change.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"pr-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Group dimension: workflowSlug | brandId | campaignId","example":"workflowSlug"},"required":false,"description":"Group dimension: workflowSlug | brandId | campaignId","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Filter by brand UUID","example":"brand-uuid-123"},"required":false,"description":"Filter by brand UUID","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign UUID","example":"campaign-uuid-456"},"required":false,"description":"Filter by campaign UUID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by exact workflow slug","example":"sales-email-cold-outreach-sienna-v3"},"required":false,"description":"Filter by exact workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Filter by workflow dynasty slug (resolved to all versioned slugs)"},"required":false,"description":"Filter by workflow dynasty slug (resolved to all versioned slugs)","name":"workflowDynastySlug","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugStats"}},"/v1/features/{featureSlug}/revenue":{"get":{"tags":["Features"],"summary":"Feature revenue overview","description":"Expected-pipeline-revenue overview for a specific feature: headline pipeline $, organizations, and leads. Scoped by brandId (+ optional campaignId). Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required) — scopes the revenue view to one brand","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required) — scopes the revenue view to one brand","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Filter by campaign UUID","example":"campaign-uuid-456"},"required":false,"description":"Filter by campaign UUID","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Filter by workflow slug","example":"sales-email-cold-outreach-mintaka-v3"},"required":false,"description":"Filter by workflow slug","name":"workflowSlug","in":"query"},{"schema":{"type":"string","description":"Group the revenue view by a dimension: campaignId or workflowSlug. Returns one grouped entry per value instead of the scalar overview","example":"workflowSlug"},"required":false,"description":"Group the revenue view by a dimension: campaignId or workflowSlug. Returns one grouped entry per value instead of the scalar overview","name":"groupBy","in":"query"},{"schema":{"type":"string","description":"Filter to a funnel lens (signups | booked-meetings | sales). Returns lens-filtered leads, each carrying conversionProbabilityPct. Absent/unknown → un-lensed overview","example":"signups"},"required":false,"description":"Filter to a funnel lens (signups | booked-meetings | sales). Returns lens-filtered leads, each carrying conversionProbabilityPct. Absent/unknown → un-lensed overview","name":"lens","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature revenue overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureRevenueResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugRevenue"}},"/v1/features/{featureSlug}/audience-stats":{"get":{"tags":["Features"],"summary":"Feature audience stats","description":"Audience-level cost and outcome evidence for a feature, scoped by brandId and goal. Proxied to features-service GET /features/{featureSlug}/audience-stats. Response shape is downstream-owned and passed through.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required)","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required)","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Optimization goal (required)","example":"signup"},"required":true,"description":"Optimization goal (required)","name":"goal","in":"query"},{"schema":{"type":"string","description":"Optional brand-profile version to scope evidence","example":"profile-uuid-123"},"required":false,"description":"Optional brand-profile version to scope evidence","name":"brandProfileId","in":"query"},{"schema":{"type":"string","description":"Optional single-campaign scope for the stats (audiences stay brand-wide; only the per-audience cost + outcome numerators narrow to this campaign). Omit for brand-wide numbers","example":"campaign-uuid-123"},"required":false,"description":"Optional single-campaign scope for the stats (audiences stay brand-wide; only the per-audience cost + outcome numerators narrow to this campaign). Omit for brand-wide numbers","name":"campaignId","in":"query"},{"schema":{"type":"string","description":"Optional row limit after sorting","example":"3"},"required":false,"description":"Optional row limit after sorting","name":"limit","in":"query"},{"schema":{"type":"string","description":"Optional comma-separated subset of active,paused,archived to scope which audiences are included (features-service owns the default)","example":"active,paused,archived"},"required":false,"description":"Optional comma-separated subset of active,paused,archived to scope which audiences are included (features-service owns the default)","name":"statuses","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature audience stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAudienceStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugAudienceStats"}},"/v1/offers/{offerId}/revenue":{"get":{"tags":["Features"],"summary":"Offer revenue overview","description":"An offer's money, across every acquisition channel it is sold through, with the per-channel breakdown beside it. Proxied to features-service GET /offers/{offerId}/revenue. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Offer UUID","example":"offer-uuid-123"},"required":true,"description":"Offer UUID","name":"offerId","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required) — an offer belongs to a brand","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required) — an offer belongs to a brand","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","example":"self-serve"},"required":false,"description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","name":"funnel","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Offer revenue overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferRevenueResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Offer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OffersByOfferIdRevenue"}},"/v1/offers/{offerId}/funnels":{"get":{"tags":["Features"],"summary":"Offer sales funnels","description":"What each of an offer's sales funnels cost and returned — one row per funnel, each with its own spend, pipeline, return per dollar and cost of acquisition. The grain under the offer, and the one that survives one campaign per STEP of a funnel: a campaign then buys a single step and has no return of its own, because the lifetime revenue sits at the end of the funnel. Proxied to features-service GET /offers/{offerId}/funnels. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Offer UUID","example":"offer-uuid-123"},"required":true,"description":"Offer UUID","name":"offerId","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required) — an offer belongs to a brand","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required) — an offer belongs to a brand","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Offer sales funnels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferFunnelsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Offer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OffersByOfferIdFunnels"}},"/v1/offers/{offerId}/audience-stats":{"get":{"tags":["Features"],"summary":"Offer audience stats","description":"An offer's per-audience economics, across every channel it is sold through, with the channel set on the same body. Proxied to features-service GET /offers/{offerId}/audience-stats. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Offer UUID","example":"offer-uuid-123"},"required":true,"description":"Offer UUID","name":"offerId","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required)","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required)","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Optimization goal. Omitting both goal and funnel is the brand-level read, not an error","example":"signup"},"required":false,"description":"Optimization goal. Omitting both goal and funnel is the brand-level read, not an error","name":"goal","in":"query"},{"schema":{"type":"string","description":"Sales funnel, same vocabulary as the per-feature read","example":"self-serve"},"required":false,"description":"Sales funnel, same vocabulary as the per-feature read","name":"funnel","in":"query"},{"schema":{"type":"string","description":"Comma-separated audience statuses (features-service owns the default)","example":"active,paused,archived"},"required":false,"description":"Comma-separated audience statuses (features-service owns the default)","name":"statuses","in":"query"},{"schema":{"type":"string","description":"Maximum number of audience rows","example":"3"},"required":false,"description":"Maximum number of audience rows","name":"limit","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default) | net. Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default) | net. Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Offer audience stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferAudienceStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Offer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OffersByOfferIdAudienceStats"}},"/v1/offers/{offerId}/pipeline-activity":{"get":{"tags":["Features"],"summary":"Offer pipeline activity","description":"An offer's per-day activity, across every acquisition channel it is sold through, day buckets merged. Proxied to features-service GET /offers/{offerId}/pipeline-activity. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Offer UUID","example":"offer-uuid-123"},"required":true,"description":"Offer UUID","name":"offerId","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required)","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required)","name":"brandId","in":"query"},{"schema":{"type":"string","description":"IANA timezone used for calendar day ordering (required)","example":"America/New_York"},"required":true,"description":"IANA timezone used for calendar day ordering (required)","name":"timezone","in":"query"},{"schema":{"type":"string","description":"Number of days to return (features-service owns the default)","example":"7"},"required":false,"description":"Number of days to return (features-service owns the default)","name":"days","in":"query"},{"schema":{"type":"string","description":"Accepted for parity with the sibling reads. Owned and validated by features-service","example":"net"},"required":false,"description":"Accepted for parity with the sibling reads. Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Offer pipeline activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferPipelineActivityResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Offer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OffersByOfferIdPipelineActivity"}},"/v1/brands/{brandId}/revenue":{"get":{"tags":["Features"],"summary":"Brand revenue overview","description":"A brand's money, across every acquisition channel it runs, with the per-channel breakdown beside it. Proxied to features-service GET /brands/{brandId}/revenue. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand UUID","example":"brand-uuid-123"},"required":true,"description":"Brand UUID","name":"brandId","in":"path"},{"schema":{"type":"string","description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","example":"self-serve"},"required":false,"description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","name":"funnel","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand revenue overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRevenueResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdRevenue"}},"/v1/brands/{brandId}/audience-stats":{"get":{"tags":["Features"],"summary":"Brand audience stats","description":"A brand's per-audience economics, across every channel it runs, with the channel set on the same body. Proxied to features-service GET /brands/{brandId}/audience-stats. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand UUID","example":"brand-uuid-123"},"required":true,"description":"Brand UUID","name":"brandId","in":"path"},{"schema":{"type":"string","description":"Optimization goal. Omitting both goal and funnel is the brand-level read, not an error","example":"signup"},"required":false,"description":"Optimization goal. Omitting both goal and funnel is the brand-level read, not an error","name":"goal","in":"query"},{"schema":{"type":"string","description":"Sales funnel, same vocabulary as the per-feature read","example":"self-serve"},"required":false,"description":"Sales funnel, same vocabulary as the per-feature read","name":"funnel","in":"query"},{"schema":{"type":"string","description":"Comma-separated audience statuses (features-service owns the default)","example":"active,paused,archived"},"required":false,"description":"Comma-separated audience statuses (features-service owns the default)","name":"statuses","in":"query"},{"schema":{"type":"string","description":"Maximum number of audience rows","example":"3"},"required":false,"description":"Maximum number of audience rows","name":"limit","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default) | net. Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default) | net. Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand audience stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandAudienceStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdAudienceStats"}},"/v1/brands/{brandId}/pipeline-activity":{"get":{"tags":["Features"],"summary":"Brand pipeline activity","description":"An offer's per-day activity, across every acquisition channel it is sold through, day buckets merged. Proxied to features-service GET /brands/{brandId}/pipeline-activity. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand UUID","example":"brand-uuid-123"},"required":true,"description":"Brand UUID","name":"brandId","in":"path"},{"schema":{"type":"string","description":"IANA timezone used for calendar day ordering (required)","example":"America/New_York"},"required":true,"description":"IANA timezone used for calendar day ordering (required)","name":"timezone","in":"query"},{"schema":{"type":"string","description":"Number of days to return (features-service owns the default)","example":"7"},"required":false,"description":"Number of days to return (features-service owns the default)","name":"days","in":"query"},{"schema":{"type":"string","description":"Accepted for parity with the sibling reads. Owned and validated by features-service","example":"net"},"required":false,"description":"Accepted for parity with the sibling reads. Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand pipeline activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPipelineActivityResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdPipelineActivity"}},"/v1/features/brands/{brandId}/offers":{"get":{"tags":["Features"],"summary":"Brand offers, each combined across its channels","description":"Every offer of a brand, each with its own money combined across every acquisition channel that offer is sold through — one lean body an offer table can poll. Proxied to features-service GET /brands/{brandId}/offers. The gateway forwards EVERY query param verbatim — the params below are documentation, not a closed list.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand UUID","example":"brand-uuid-123"},"required":true,"description":"Brand UUID","name":"brandId","in":"path"},{"schema":{"type":"string","description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","example":"self-serve"},"required":false,"description":"Sales funnel the cost-per-outcome columns are priced on. Owned and validated by features-service","name":"funnel","in":"query"},{"schema":{"type":"string","description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","example":"net"},"required":false,"description":"Pricing basis for money metrics: gross (default, undiscounted) | net (the org's discounted figures). Owned and validated by features-service","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand offers with per-offer economics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOffersResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Brand not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesBrandsByBrandIdOffers"}},"/v1/features/{featureSlug}/workflow-projection":{"get":{"tags":["Features"],"summary":"Feature workflow projection","description":"Serves a 3-grain (crossOrg → brand → audience) cost-per-outcome projection ladder + a resolved pick, keyed per (audienceId?, workflowDynasty), for a specific feature. Scoped by brandId; goal/objective select the outcome metric. Folds in the audience×workflow grain formerly served by the removed /candidates endpoint. Proxied from features-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required) — scopes the projection to one brand","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required) — scopes the projection to one brand","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Optimization goal selecting the outcome metric (camel/snake/kebab). Also accepted via `objective`. Defaults to meeting-booked","example":"meetingBooked"},"required":false,"description":"Optimization goal selecting the outcome metric (camel/snake/kebab). Also accepted via `objective`. Defaults to meeting-booked","name":"goal","in":"query"},{"schema":{"type":"string","description":"Alias of `goal` (snake/kebab spelling). Either param is accepted","example":"meeting-booked"},"required":false,"description":"Alias of `goal` (snake/kebab spelling). Either param is accepted","name":"objective","in":"query"},{"schema":{"type":"string","description":"Optional audience UUID context (echoed via audience rows)","example":"audience-uuid-123"},"required":false,"description":"Optional audience UUID context (echoed via audience rows)","name":"audienceId","in":"query"},{"schema":{"type":"string","description":"Optional budget context (back-compat; the grain ladder + recommendedBudgetUsd carry the projection surface)","example":"1000"},"required":false,"description":"Optional budget context (back-compat; the grain ladder + recommendedBudgetUsd carry the projection surface)","name":"budgetUsd","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature workflow projection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowProjectionResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugWorkflowProjection"}},"/v1/features/{featureSlug}/goal-arbitration":{"get":{"tags":["Features"],"summary":"Feature goal arbitration","description":"The goal features-service elects for a brand out of the sales funnels that brand declared — the same arbitration campaign-service reads service-to-service, so a client can show the goal that actually runs instead of the brand's stored optimizationGoal. Proxied to features-service GET /features/{featureSlug}/goal-arbitration; every query param is forwarded and the response shape is downstream-owned and passed through. The upstream status AND body both survive: a 502 with reason='authorized_goals_unavailable' (this brand never stated a funnel set) is distinguishable from a 200 whose arbitration.reason='no_authorized_goals' (it stated it sells through none).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Feature slug","example":"sales-cold-email-outreach"},"required":true,"description":"Feature slug","name":"featureSlug","in":"path"},{"schema":{"type":"string","description":"Brand UUID (required) — the authorized goal set and the economics are brand-scoped","example":"brand-uuid-123"},"required":true,"description":"Brand UUID (required) — the authorized goal set and the economics are brand-scoped","name":"brandId","in":"query"},{"schema":{"type":"string","description":"Pricing basis for every money metric: omit or 'gross' for undiscounted figures (default), 'net' for the org's discounted ones","example":"net"},"required":false,"description":"Pricing basis for every money metric: omit or 'gross' for undiscounted figures (default), 'net' for the org's discounted ones","name":"pricing","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Feature goal arbitration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureGoalArbitrationResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Feature not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Downstream service error, or the brand's declared sales funnels could not be read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1FeaturesByFeatureSlugGoalArbitration"}},"/public/stats/users":{"get":{"tags":["Public Stats"],"summary":"Public user/org stats (no auth)","description":"Returns total orgs, total users, and monthly growth breakdown. No authentication required. Proxied from client-service.","responses":{"200":{"description":"User/org stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUserStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getPublicStatsUsers","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/public/stats/billing":{"get":{"tags":["Public Stats"],"summary":"Public billing stats (no auth)","description":"Returns total accounts, payment-method coverage, grant/credit aggregates, and monthly/weekly growth breakdowns. No authentication required. Proxied from billing-service.","responses":{"200":{"description":"Billing stats — pass-through from billing-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBillingStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getPublicStatsBilling","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/public/stats/runs":{"get":{"tags":["Public Stats"],"summary":"Public run stats (no auth)","description":"Returns run counts by status and monthly completed breakdown. No authentication required. Proxied from runs-service.","responses":{"200":{"description":"Run stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getPublicStatsRuns","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/public/conversions":{"post":{"tags":["Public"],"summary":"Ingest a conversion event (no Clerk auth — per-brand token)","description":"PUBLIC conversion-tracking ingest. Called directly by third-party client websites (conversion snippet / server-side postback). NOT authenticated by a Clerk session — the per-brand publishable token travels in the `x-conversion-token` header (or `Authorization: Bearer`) and is verified downstream. Proxied to lead-service POST /public/conversions; the raw JSON body is forwarded untouched. Response (expected 200 { received: true }, or its 400/401) is owned by the downstream service.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionIngestRequest"}}}},"responses":{"200":{"description":"Conversion received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionIngestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid payload (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Invalid or missing conversion token (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postPublicConversions","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/public/features":{"get":{"tags":["Features"],"summary":"List active features (public, no auth)","description":"Returns all active features. No authentication required. Proxied from features-service.","responses":{"200":{"description":"Active features","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicFeaturesListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getPublicFeatures","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/costs/platform-prices":{"get":{"tags":["Public Costs"],"summary":"List platform prices (public, no auth)","description":"Returns the live list of platform unit costs grouped by provider. No authentication required. Pure pass-through to costs-service GET /v1/platform-prices. Each row includes provider/providerDomain (for logo.dev), type, unit, and decimal-string USD cents.","responses":{"200":{"description":"Platform prices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformPricesResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream costs-service unreachable or returned non-2xx","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1CostsPlatformPrices","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/orgs/quote-requests":{"get":{"tags":["Expert Quotes"],"summary":"List quote requests for the org","description":"Pure pass-through to journalists-quotes-service GET /orgs/quote-requests. Filter by campaign_id and/or source. Caller controls pagination via limit/offset.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"campaign_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of quote requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequestsListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsQuoteRequests"}},"/v1/orgs/quote-requests/stats":{"get":{"tags":["Expert Quotes"],"summary":"Aggregate stats for quote requests + pitches","description":"Pass-through to journalists-quotes-service GET /orgs/quote-requests/stats.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"campaign_id","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Quote request stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequestsStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsQuoteRequestsStats"}},"/v1/orgs/quote-requests/{id}":{"get":{"tags":["Expert Quotes"],"summary":"Get a single quote request","description":"Pass-through to journalists-quotes-service GET /orgs/quote-requests/{id}.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Quote request id"},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Quote request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Quote request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsQuoteRequestsById"}},"/v1/orgs/quote-pitches":{"get":{"tags":["Expert Quotes"],"summary":"List quote pitches for the org","description":"Pure pass-through to journalists-quotes-service GET /orgs/quote-pitches. Filter by campaign_id and/or status. Caller controls pagination via limit/offset.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"campaign_id","in":"query"},{"schema":{"type":"string","enum":["drafted","submitted","selected","published","not_selected","error"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of quote pitches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePitchesListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsQuotePitches"}},"/v1/orgs/quote-pitches/{id}":{"get":{"tags":["Expert Quotes"],"summary":"Get a single quote pitch","description":"Pass-through to journalists-quotes-service GET /orgs/quote-pitches/{id}.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Quote pitch id"},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Quote pitch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePitchResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Quote pitch not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsQuotePitchesById"}},"/v1/orgs/opportunities":{"get":{"tags":["Expert Quotes"],"summary":"Paginated read of scored Gold-cluster opportunities for the brand-set","description":"Pure pass-through to journalists-quotes-service GET /orgs/opportunities. Brand identity flows via the x-brand-id header (CSV when plural). Filter by campaignId. Caller controls pagination via limit/offset. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Scored opportunities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunitiesListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsOpportunities"}},"/v1/orgs/opportunities/next":{"post":{"tags":["Expert Quotes"],"summary":"Single highest-scored Gold-cluster opportunity for the brand-set","description":"Pass-through to journalists-quotes-service POST /orgs/opportunities/next. Mirrors lead-service POST /orgs/buffer/next semantics. Brand identity via x-brand-id header (CSV when plural). Excludes opportunities with a non-retryable pitch (drafted/submitted/selected/published/not_selected) on the exact brand-set. Returns { found: false } when nothing eligible remains. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityNextRequest"}}}},"responses":{"200":{"description":"Next opportunity (or { found: false })","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityNextResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"postV1OrgsOpportunitiesNext","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/opportunities/discover":{"post":{"tags":["Expert Quotes"],"summary":"Write-only batch scorer — ingest + score unscored opportunities for the brand-set","description":"Pass-through to journalists-quotes-service POST /orgs/opportunities/discover. Brand identity flows via the x-brand-id header (CSV when plural). Empty request body. Ingests Featured + scores the next batch of unscored opportunities for the brand-set tuple. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityDiscoverRequest"}}}},"responses":{"200":{"description":"Discovery result ({ scored, exhausted, brandIds })","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityDiscoverResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"postV1OrgsOpportunitiesDiscover","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/opportunities/{id}/reply":{"post":{"tags":["Expert Quotes"],"summary":"Submit a HITL pitch reply for the given Gold-cluster opportunity","description":"Pass-through to journalists-quotes-service POST /orgs/opportunities/{id}/reply. `id` = quote_opportunities.id (Gold cluster). Brand identity via x-brand-id header (CSV when plural). The downstream service picks a representative silver row (Featured-API preferred, else most recent email) and dispatches via Featured submitAnswer or email-gateway-service /orgs/send. Idempotency: exact-match on (quote_opportunity_id, sorted brand_ids[]) — co-branded [A,B] is distinct from solo [A]. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Gold-cluster opportunity id (quote_opportunities.id)"},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityReplyRequest"}}}},"responses":{"200":{"description":"Reply submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityReplyResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Opportunity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"postV1OrgsOpportunitiesByIdReply"}},"/v1/orgs/visibility-score-runs":{"get":{"tags":["AI Visibility"],"summary":"List visibility-score runs with deltas","description":"Pure pass-through to ai-visibility-score-service GET /orgs/visibility-score-runs. Each row includes a delta block vs. the immediately previous run for the same brand. Filter by brandId, domain, campaignId, or date range (from/to).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"domain","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"campaignId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"List of visibility-score runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityScoreRunsListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsVisibilityScoreRuns"},"post":{"tags":["AI Visibility"],"summary":"Run a visibility-score audit for a single brand","description":"Pass-through to ai-visibility-score-service POST /orgs/visibility-score-runs. Runs an N-prompt LLM audit against the brand identified by `x-brand-id`. Optional `campaignId` in the body associates the run with a campaign.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityScoreRunCreateRequest"}}}},"responses":{"200":{"description":"Run results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityScoreRunCreateResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"postV1OrgsVisibilityScoreRuns","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/visibility-score-runs/{id}":{"get":{"tags":["AI Visibility"],"summary":"Get a single visibility-score run","description":"Pass-through to ai-visibility-score-service GET /orgs/visibility-score-runs/{id}. Returns run + prompts[] + competitors[] + top_competitors[] + citation_opportunities[].","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Visibility-score run id"},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Visibility-score run bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityScoreRunDetailResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsVisibilityScoreRunsById"}},"/v1/invites/validate":{"post":{"tags":["Invites"],"summary":"Validate an invite code (no auth)","description":"Public pass-through to client-service POST /public/invites/validate. Returns whether the supplied invite code is currently redeemable. Body + response shapes are owned by the downstream service.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteValidateRequest"}}}},"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteValidateResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1InvitesValidate","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/waitlist/request-access":{"post":{"tags":["Waitlist"],"summary":"Request waitlist access (no auth)","description":"Public pass-through to client-service POST /public/waitlist/request-access. Downstream inserts the waitlist row and fires the confirmation email. Body + response shapes are owned by the downstream service.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequestAccessRequest"}}}},"responses":{"200":{"description":"Waitlist position","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequestAccessResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1WaitlistRequestAccess","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}]}},"/v1/waitlist/position":{"get":{"tags":["Waitlist"],"summary":"Look up waitlist position by email (no auth)","description":"Public pass-through to client-service GET /public/waitlist/position. Response shape is owned by the downstream service.","parameters":[{"schema":{"type":"string","format":"email","description":"Email that signed up to the waitlist"},"required":true,"name":"email","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."}],"responses":{"200":{"description":"Waitlist position","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistPositionResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Email not on waitlist (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1WaitlistPosition"}},"/v1/orgs/{orgId}/invites/status":{"get":{"tags":["Invites"],"summary":"Get invite quota status for an org","description":"Pass-through to client-service GET /internal/orgs/{orgId}/invites/status. Returns used / total quota and the org's invite code. The {orgId} path segment MUST match the authenticated x-org-id; mismatch returns 403. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Org UUID (must match authenticated org)"},"required":true,"name":"orgId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Invite status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitesStatusResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"orgId path does not match authenticated org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"getV1OrgsByOrgIdInvitesStatus"}},"/v1/orgs/{orgId}/invites/claim":{"post":{"tags":["Invites"],"summary":"Claim an invite code for the authenticated org","description":"Pass-through to client-service POST /internal/invites/claim. Send only { code }: the gateway supplies the downstream-required inviteeOrgId from the authenticated identity, and discards any inviteeOrgId in the request body so a caller can never claim on behalf of another org. Downstream orchestrates: record claim row -> grant credits to inviter + invitee via billing-service -> send the invite confirmation emails via transactional-email-service. Idempotent on (code, inviteeOrgId). The {orgId} path segment MUST match the authenticated x-org-id; mismatch returns 403. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Org UUID (must match authenticated org)"},"required":true,"name":"orgId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitesClaimRequest"}}}},"responses":{"200":{"description":"Claim result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitesClaimResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Invalid code (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"403":{"description":"orgId path does not match authenticated org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"Unknown invite code (forwarded verbatim from downstream)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"409":{"description":"Invite cap reached. Downstream body is forwarded field-for-field, including used / total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgInvitesClaimResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}}},"operationId":"postV1OrgsByOrgIdInvitesClaim"}},"/v1/brands/{brandId}/pause":{"get":{"tags":["Campaigns"],"summary":"Get a brand's pause state","description":"Proxy to campaign-service GET /brands/{brandId}/pause. Returns the brand's pause state. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Brand pause state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPauseResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdPause"},"patch":{"tags":["Campaigns"],"summary":"Update a brand's pause state","description":"Proxy to campaign-service PATCH /brands/{brandId}/pause. Body { paused: boolean }. Body + response shapes are owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPauseRequest"}}}},"responses":{"200":{"description":"Updated brand pause state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPauseResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1BrandsByBrandIdPause"}},"/v1/brands/{brandId}/spendable-budget":{"get":{"tags":["Campaigns"],"summary":"Get a brand's configured and actually-running daily budget","description":"Proxy to campaign-service GET /brands/{brandId}/spendable-budget. Answers both figures for a brand: what the customer configured, and the part of it attached to a campaign that is ongoing right now, with per-offer / per-campaign / per-ceiling decompositions so no caller has to sum anything. Response shape is owned by the downstream service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Brand ID"},"required":true,"description":"Brand ID","name":"brandId","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Configured and running daily budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandSpendableBudgetResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1BrandsByBrandIdSpendableBudget"}},"/v1/orgs/audiences/suggest":{"post":{"tags":["Audiences"],"summary":"Suggest candidate audiences from a natural-language prompt","description":"Proxy to human-service POST /orgs/audiences/suggest. Body { nlPrompt, brandId }. Request + response shapes are owned by human-service — see its openapi.json. Forwarded untransformed.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Candidate audiences (human-service { candidates })","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceSuggestResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsAudiencesSuggest","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/audiences/stats":{"post":{"tags":["Audiences"],"summary":"Per-audience membership stats for a list of emails / personIds","description":"Proxy to human-service POST /orgs/audiences/stats. Request + response shapes owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Stats as returned by human-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceStatsResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsAudiencesStats","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/audiences":{"post":{"tags":["Audiences"],"summary":"Create an audience","description":"Proxy to human-service POST /orgs/audiences. Request + response shapes owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Created audience","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsAudiences","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"get":{"tags":["Audiences"],"summary":"List audiences for an org","description":"Proxy to human-service GET /orgs/audiences. Optional brandId + status (lifecycle) filters + limit/offset pagination forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID filter"},"required":false,"name":"brandId","in":"query"},{"schema":{"type":"string","description":"Lifecycle filter (suggested|active|paused|archived) — forwarded to human-service"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Max results (human-service enforces its own cap)"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Pagination offset"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Audiences as returned by human-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceListResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsAudiences"}},"/v1/orgs/audiences/{id}/refresh-count":{"post":{"tags":["Audiences"],"summary":"Re-snapshot apollo + apify counts for an audience","description":"Proxy to human-service POST /orgs/audiences/{id}/refresh-count. Response shape owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Updated audience counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsAudiencesByIdRefreshCount"}},"/v1/orgs/audiences/{id}/avatar":{"post":{"tags":["Audiences"],"summary":"(Re)generate the audience's avatar","description":"Proxy to human-service POST /orgs/audiences/{id}/avatar. Optional body { prompt }. human-service generates the avatar via chat-service (which owns the cost) and returns { audience } with avatarUrl populated. Request + response shapes owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Audience with regenerated avatar (human-service { audience })","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsAudiencesByIdAvatar"}},"/v1/orgs/audiences/{id}/members":{"get":{"tags":["Audiences"],"summary":"List the canonical people who are members of an audience","description":"Proxy to human-service GET /orgs/audiences/{id}/members. limit/offset pagination forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"schema":{"type":"integer","nullable":true,"description":"Max results (human-service enforces its own cap)"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"description":"Pagination offset"},"required":false,"name":"offset","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Members as returned by human-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceMembersResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsAudiencesByIdMembers"}},"/v1/orgs/audiences/{id}":{"get":{"tags":["Audiences"],"summary":"Get an audience by id","description":"Proxy to human-service GET /orgs/audiences/{id}. Response shape owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Audience as returned by human-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsAudiencesById"},"patch":{"tags":["Audiences"],"summary":"Update an audience","description":"Proxy to human-service PATCH /orgs/audiences/{id}. Request + response shapes owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Updated audience","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1OrgsAudiencesById"},"delete":{"tags":["Audiences"],"summary":"Delete an audience (cascades members)","description":"Proxy to human-service DELETE /orgs/audiences/{id}. Response shape owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Deletion result as returned by human-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"deleteV1OrgsAudiencesById"}},"/v1/orgs/audiences/{id}/status":{"patch":{"tags":["Audiences"],"summary":"Change an audience's status (active / paused / archived)","description":"Proxy to human-service PATCH /orgs/audiences/{id}/status. Body { status } + response shapes owned by human-service. Forwarded untransformed.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Audience ID"},"required":true,"description":"Audience ID","name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Updated audience","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"human-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1OrgsAudiencesByIdStatus"}},"/v1/orgs/contacts/upload":{"post":{"tags":["CRM Contacts"],"summary":"Upload a CSV of contacts (bronze ingest + async silver promotion)","description":"Proxy to crm-service POST /orgs/contacts/upload. Multipart body (field `file` = CSV, `brandId` required, optional `columnMapping`) is forwarded untransformed — the multipart boundary is preserved byte-for-byte. Requires x-user-id. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CrmUploadMultipartBody"}}}},"responses":{"200":{"description":"Upload ingested (crm-service { uploadId, rowCount, status, mappingProvenance })","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsContactsUpload","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/contacts":{"get":{"tags":["CRM Contacts"],"summary":"List silver contacts for a brand","description":"Proxy to crm-service GET /orgs/contacts. The whole query string is forwarded untransformed. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required by crm-service)"},"required":true,"name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Contacts as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsContacts"}},"/v1/orgs/contacts/uploads":{"get":{"tags":["CRM Contacts"],"summary":"List uploads and their status for a brand","description":"Proxy to crm-service GET /orgs/contacts/uploads. The whole query string is forwarded untransformed. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required by crm-service)"},"required":true,"name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Uploads as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsContactsUploads"}},"/v1/orgs/contacts/serve-stats":{"get":{"tags":["CRM Contacts"],"summary":"Served vs remaining sendable counts for a brand","description":"Proxy to crm-service GET /orgs/contacts/serve-stats. The whole query string is forwarded untransformed, including a repeated or comma-separated `uploadIds` per-file scope. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required by crm-service)"},"required":true,"name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Serve stats as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsContactsServeStats"}},"/v1/orgs/contacts/serve-next":{"post":{"tags":["CRM Contacts"],"summary":"Serve the next batch of un-served contacts for a brand","description":"Proxy to crm-service POST /orgs/contacts/serve-next. Request body forwarded verbatim — crm-service owns its shape. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughRequest"}}}},"responses":{"200":{"description":"Served contacts as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsContactsServeNext","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]}},"/v1/orgs/matrix/connections":{"post":{"tags":["CRM Contacts"],"summary":"Register (or update) a brand's Matrix DM connection","description":"Proxy to crm-service POST /orgs/matrix/connections — the WhatsApp / Telegram / Discord bridge a brand's inbound DMs arrive on. Request body forwarded verbatim. Requires x-user-id: crm-service persists the creator on the row so the sync cron can bill the org. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughRequest"}}}},"responses":{"200":{"description":"Connection as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"postV1OrgsMatrixConnections","parameters":[{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}]},"get":{"tags":["CRM Contacts"],"summary":"Matrix DM connection health for a brand","description":"Proxy to crm-service GET /orgs/matrix/connections. The whole query string is forwarded untransformed. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required by crm-service)"},"required":true,"name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Connections as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsMatrixConnections"}},"/v1/orgs/matrix/connections/{id}":{"patch":{"tags":["CRM Contacts"],"summary":"Pause or resume a Matrix DM connection","description":"Proxy to crm-service PATCH /orgs/matrix/connections/{id}. Request body forwarded verbatim. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Connection ID"},"required":true,"name":"id","in":"path"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughRequest"}}}},"responses":{"200":{"description":"Connection as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"404":{"description":"No such connection (forwarded verbatim)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"patchV1OrgsMatrixConnectionsById"}},"/v1/orgs/matrix/leads":{"get":{"tags":["CRM Contacts"],"summary":"Leads read out of a brand's inbound DM conversations","description":"Proxy to crm-service GET /orgs/matrix/leads — one row per conversation, carrying the LLM's reading plus the conversation counters and contact identity. The whole query string is forwarded untransformed. Response shape owned by crm-service.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Brand ID (required by crm-service)"},"required":true,"name":"brandId","in":"query"},{"name":"x-request-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"},"description":"Correlation id for this request. Echoed back verbatim in the `x-request-id` response header. Omit it and the gateway generates a UUID, so the response header is always present. Useful for tying a response back to the call that produced it when issuing concurrent requests."},{"name":"x-org-id","in":"header","required":false,"schema":{"type":"string"},"description":"External organization ID (e.g. Clerk org ID `org_2xyz...`). Required when using an app key (`distrib.app_*`) on endpoints that need org context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-user-id","in":"header","required":false,"schema":{"type":"string"},"description":"External user ID (e.g. Clerk user ID `user_2abc...`). Required when using an app key (`distrib.app_*`) on endpoints that need user context. Ignored when using a user key (`distrib.usr_*`)."},{"name":"x-campaign-id","in":"header","required":false,"schema":{"type":"string"},"description":"Campaign ID. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-brand-id","in":"header","required":false,"schema":{"type":"string","example":"uuid1,uuid2,uuid3"},"description":"Brand ID(s), comma-separated UUIDs. Supports multi-brand campaigns. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-workflow-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Workflow slug. Automatically injected by workflow-service on workflow HTTP calls. Optional — forwarded to downstream services for tracking."},{"name":"x-feature-slug","in":"header","required":false,"schema":{"type":"string"},"description":"Feature slug. Optional — forwarded to downstream services and runs for tracking."}],"responses":{"200":{"description":"Leads as returned by crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPassthroughResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"400":{"description":"Bad request, forwarded verbatim from crm-service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"429":{"description":"Rate limit exceeded. Wait `Retry-After` seconds and retry; the budget that was exceeded is named in the body and described in `RateLimit-Policy`.","headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Rate limit exceeded"},"code":{"type":"string","example":"RATE_LIMITED"},"policy":{"type":"string","example":"authenticated"},"limit":{"type":"integer","example":600},"windowSeconds":{"type":"integer","example":60},"retryAfterSeconds":{"type":"integer","example":42}},"required":["error","code","retryAfterSeconds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}},"502":{"description":"crm-service unreachable / not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit":{"description":"Current rate-limit state for this caller, e.g. `limit=600, remaining=597, reset=42`. `reset` is seconds until the window rolls over.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"Every budget this API applies, e.g. `\"authenticated\";q=600;w=60, \"anonymous\";q=120;w=60` — `q` is requests per window, `w` is the window in seconds.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests still available in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"x-request-id":{"description":"Correlation id — the `x-request-id` you sent, or one generated by the gateway.","schema":{"type":"string"}},"Deprecation":{"description":"Present ONLY on a deprecated operation. `@<unix-seconds>` (RFC 9745) — when the operation was announced as deprecated. Absent means the operation is not deprecated.","schema":{"type":"string"}},"Sunset":{"description":"Present ONLY on a deprecated operation. HTTP-date (RFC 8594) — the earliest date the operation may stop working, never less than 180 days after `Deprecation`.","schema":{"type":"string"}},"Link":{"description":"Present ONLY on a deprecated operation. `<url>; rel=\"deprecation\"` — the replacement operation or the changelog entry.","schema":{"type":"string"}}}}},"operationId":"getV1OrgsMatrixLeads"}}},"x-deprecation-policy":{"policyUrl":"https://api.distribute.you/docs#deprecation-policy","minimumNoticeDays":180,"versioning":"url-path","currentVersion":"v1","signals":{"openapi":"The operation carries `deprecated: true` in this document.","deprecationHeader":"`Deprecation: @<unix-seconds>` (RFC 9745) on every response from a deprecated operation.","sunsetHeader":"`Sunset: <HTTP-date>` (RFC 8594) — the earliest date the operation may stop working.","linkHeader":"`Link: <url>; rel=\"deprecation\"` — the replacement operation or changelog entry."}}}