{"openapi":"3.0.3","info":{"title":"Cognis Public API","version":"1.0.0","description":"API for programmatic access. Authenticate with `Authorization: Bearer cogn_xxx`. Create API keys at Account → Developer. All responses use the envelope format: `{ success, data?, message?, traceId?, meta? }`. Errors include `errors: [{ code, message }]`."},"servers":[{"url":"https://api.cognissuite.com/api/v1","description":"Production"}],"tags":[{"name":"AI Runs","description":"AI Runs API"},{"name":"Brand","description":"Brand API"},{"name":"Brand Profile","description":"Brand Profile API"},{"name":"Commerce Analytics","description":"Commerce Analytics API"},{"name":"Commerce Brand Launch","description":"Commerce Brand Launch API"},{"name":"Commerce Catalog","description":"Commerce Catalog API"},{"name":"Commerce Checkout","description":"Commerce Checkout API"},{"name":"Commerce Collections","description":"Commerce Collections API"},{"name":"Commerce Discounts","description":"Commerce Discounts API"},{"name":"Commerce Domains","description":"Commerce Domains API"},{"name":"Commerce Google Shopping","description":"Commerce Google Shopping API"},{"name":"Commerce Integration Health","description":"Commerce Integration Health API"},{"name":"Commerce Orders","description":"Commerce Orders API"},{"name":"Commerce Products","description":"Commerce Products API"},{"name":"Commerce Reviews","description":"Commerce Reviews API"},{"name":"Commerce Settings","description":"Commerce Settings API"},{"name":"Commerce Shipping","description":"Commerce Shipping API"},{"name":"Commerce Translations","description":"Commerce Translations API"},{"name":"Design Proposals","description":"Design Proposals API"},{"name":"Docs","description":"Docs API"},{"name":"Integration","description":"Integration API"},{"name":"LAP Hosted Sites","description":"LAP Hosted Sites API"},{"name":"Meta","description":"Meta API"},{"name":"Org","description":"Organization-scoped endpoints. Requires api_allowed on member."},{"name":"Org Members","description":"Org Members API"},{"name":"Product","description":"Product API"},{"name":"Storage","description":"Storage API"},{"name":"User","description":"User-scoped endpoints."}],"paths":{"/user/{userId}/orgs":{"get":{"operationId":"listOrganizationsForUser","summary":"List Organizations For User","description":"List organizations for the authenticated user. Path userId may be `me` (recommended for MCP/Public API bootstrap) or the caller's own SID/UUID; cross-user reads are rejected. Same epoch/Redis caching as the dashboard organizations page (u.orgs + o.meta); optional search filters by name or id. Hard limit 50 orgs.","tags":["User"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","description":"User ID"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Optional case-insensitive filter on org name or id"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"1","name":"Acme Corp","brandCount":3,"memberCount":5,"role":"admin","description":"3 brands · 5 members · Admin"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/user/{userId}/orgs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/user/{userId}/orgs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/user/{userId}/orgs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}":{"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: org.getById\n\n**Required scopes:** `org:read`","tags":["Org"],"x-scopes":["org:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","name":"Acme Corp","description":"Primary organization for Acme","created_at":"2025-01-01T19:42:28.687Z","updated_at":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/members":{"get":{"operationId":"list","summary":"List","description":"Public API endpoint: orgMember.list\n\n**Required scopes:** `org:team:read`","tags":["Org Members"],"x-scopes":["org:team:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","firstName","lastName","email","createdAt","updatedAt","role","status","inviteExpiresAt","displayStatus","clickupUserId","clickupIntegrationId","clickupWorkspaceId","hourlyRate","hourlyRateCurrency","monthlyFixedRate","monthlyFixedRateCurrency","compensationType","compensationFrequency","apiAllowed","scopeOverlay"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","firstName","lastName","email","createdAt","updatedAt","role","status","inviteExpiresAt","displayStatus","clickupUserId","clickupIntegrationId","clickupWorkspaceId","hourlyRate","hourlyRateCurrency","monthlyFixedRate","monthlyFixedRateCurrency","compensationType","compensationFrequency","apiAllowed","scopeOverlay"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","firstName","lastName","email","createdAt","updatedAt","role","status","inviteExpiresAt","displayStatus","clickupUserId","clickupIntegrationId","clickupWorkspaceId","hourlyRate","hourlyRateCurrency","monthlyFixedRate","monthlyFixedRateCurrency","compensationType","compensationFrequency","apiAllowed","scopeOverlay"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}},{"name":"role","in":"query","required":false,"schema":{"type":"string","enum":["owner","super_admin","admin","manager","member","billing","viewer","contributor","custom"]}},{"name":"id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"100","firstName":"Jane","lastName":"Doe","email":"jane.doe@acme.com","createdAt":"2025-01-03T08:00:00.000Z","updatedAt":"2025-01-03T08:00:00.000Z","role":"member","status":"active","inviteExpiresAt":null,"displayStatus":"active"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/members' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/members', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/members',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/brands":{"get":{"operationId":"list","summary":"List","description":"List available brands for the organization by passing the organization id\n\n**Required scopes:** `org:brands:read`","tags":["Brand"],"x-scopes":["org:brands:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","description","createdAt","updatedAt","orgId","createdBy"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","createdAt","updatedAt","orgId","createdBy"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","name","description","createdAt","updatedAt","orgId","createdBy"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"10","name":"Acme Brand","description":"Consumer brand for Acme","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","org":{"id":"1","name":"Acme Org"},"createdBy":{"id":"100","name":"Jane Doe"}}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/brands' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/brands', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/brands',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"create","summary":"Create","description":"Public API endpoint: orgBrand.create\n\n**Required scopes:** `org:brands:create`","tags":["Brand"],"x-scopes":["org:brands:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"10","name":"Acme Brand","description":"Consumer brand for Acme","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","org":{"id":"1","name":"Acme Org"},"createdBy":{"id":"100","name":"Jane Doe"}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/brands' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/brands', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/brands',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/brands/search":{"get":{"operationId":"search","summary":"Search","description":"Search brands for an organization. Use `search` to filter results; optionally set `sortOrder` to sort by createdAt.\n\n**Required scopes:** `org:brands:read`","tags":["Brand"],"x-scopes":["org:brands:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Free-text search for brands"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order by createdAt"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"10","name":"Acme Brand","description":"Consumer brand for Acme","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","org":{"id":"1","name":"Acme Org"},"createdBy":{"id":"100","name":"Jane Doe"}}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/brands/search' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/brands/search', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/brands/search',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections/{collectionId}":{"delete":{"operationId":"delete","summary":"Delete","description":"Public API endpoint: ecomCollection.delete\n\n**Required scopes:** `org:ecom:collections:delete`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: ecomCollection.getById\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"ecoll-1","orgId":"1","parentId":null,"name":"Spring","slug":"spring","shortDescription":"Spring season collection","llmDetails":"Use for seasonal merchandising cues.","brandIds":[],"createdBy":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patch","summary":"Patch","description":"Public API endpoint: ecomCollection.patch\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"ecoll-1","orgId":"1","parentId":null,"name":"Spring","slug":"spring","shortDescription":"Spring season collection","llmDetails":"Use for seasonal merchandising cues.","brandIds":[],"createdBy":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"parentId":{"type":"string","nullable":true},"slug":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"enum":["null"],"nullable":true}]},"shortDescription":{"type":"string","nullable":true},"llmDetails":{"type":"string","nullable":true},"brandIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}":{"delete":{"operationId":"deleteImage","summary":"Delete Image","description":"Public API endpoint: ecomCollection.deleteImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"imageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchImage","summary":"Patch Image","description":"Public API endpoint: ecomCollection.patchImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"imageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"eci-1","collectionId":"ecoll-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","nullable":true},"lang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"nullable":true},"sortOrder":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images/{imageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections/{collectionId}/products/{productId}":{"delete":{"operationId":"deleteProduct","summary":"Delete Product","description":"Public API endpoint: ecomCollection.deleteProduct\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products/{productId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products/{productId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products/{productId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/translations/{translationId}":{"delete":{"operationId":"delete","summary":"Delete","description":"Public API endpoint: ecomTranslation.delete\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"translationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: ecomTranslation.getById\n\n**Required scopes:** `org:ecom:translations:read`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"translationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"etx-sample","orgId":"1","entityType":"product","entityId":"prod-sample","namespace":"ecom","tKey":"title","locale":"sv","sourceValue":"English title","value":"Svensk titel","format":"plain","version":1,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/{translationId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/images/{imageId}":{"delete":{"operationId":"deleteImage","summary":"Delete Image","description":"Public API endpoint: ecomProduct.deleteImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"imageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchImage","summary":"Patch Image","description":"Public API endpoint: ecomProduct.patchImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"imageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"epi-1","productId":"prod-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"shopifyMediaId":null,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","nullable":true},"lang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"nullable":true},"sortOrder":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/{imageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/sync-shopify-images-all":{"post":{"operationId":"enqueueSyncAllShopifyImages","summary":"Enqueue Sync All Shopify Images","description":"Public API endpoint: ecomProduct.enqueueSyncAllShopifyImages\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"queued":12,"totalShopifyLinked":40,"truncated":true,"staggerMs":4000,"maxPerRun":500},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/sync-shopify-images-all' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/sync-shopify-images-all', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/sync-shopify-images-all',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/ecom-translations/enqueue-ai-fill-missing":{"post":{"operationId":"enqueueAiFillMissingTranslations","summary":"Enqueue Ai Fill Missing Translations","description":"Public API endpoint: ecomProduct.enqueueAiFillMissingTranslations\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"enqueued":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/enqueue-ai-fill-missing' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/enqueue-ai-fill-missing', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/enqueue-ai-fill-missing',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/translations/fill-empty":{"post":{"operationId":"fillEmpty","summary":"Fill Empty","description":"Public API endpoint: ecomTranslation.fillEmpty\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"created":0,"insertErrors":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/fill-empty' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/fill-empty', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/fill-empty',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/ecom/domain/domainsearch":{"get":{"operationId":"searchByDomain","summary":"Search By Domain","description":"Public API endpoint: ecomDomain.searchByDomain","tags":["Commerce Domains"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"123","orgId":"456"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/ecom/domain/domainsearch' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/ecom/domain/domainsearch', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/ecom/domain/domainsearch',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/automation/brand-launch/porkbun-domains":{"get":{"operationId":"getPorkbunDomains","summary":"Get Porkbun Domains","description":"Public API endpoint: ecomBrandLaunch.getPorkbunDomains\n\n**Required scopes:** `org:ecom:read`","tags":["Commerce Brand Launch"],"x-scopes":["org:ecom:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"porkbunIntegrationId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"domains":[{"apex":"unused-porkbun-asset.com","expireDate":"2027-01-15T00:00:00.000Z","autoRenew":false}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/porkbun-domains' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/porkbun-domains', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/porkbun-domains',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/automation/brand-launch/prerequisites":{"get":{"operationId":"getPrerequisites","summary":"Get Prerequisites","description":"Public API endpoint: ecomBrandLaunch.getPrerequisites\n\n**Required scopes:** `org:ecom:read`","tags":["Commerce Brand Launch"],"x-scopes":["org:ecom:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainSource","in":"query","required":false,"schema":{"type":"string","enum":["reuse_existing","purchase_new","porkbun_existing"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ready":false,"wizardReady":false,"items":[{"id":"porkbun_connected","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.porkbunConnected.detail"},{"id":"porkbun_default","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.porkbunDefault.detail"},{"id":"cloudflare_connected","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.cloudflareConnected.detail"},{"id":"stripe_checkout","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.stripeCheckout.detail"},{"id":"airwallex_checkout","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.airwallexCheckout.detail"},{"id":"org_languages","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.orgLanguages.detail"},{"id":"mailgun_ready","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.mailgunReady.detail"},{"id":"experimental_access","met":false,"detailKey":"ecom.automation.brandLaunch.prerequisites.experimentalAccess.detail"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/prerequisites' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/prerequisites', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/prerequisites',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/automation/brand-launch/reuse-domains":{"get":{"operationId":"getReuseDomains","summary":"Get Reuse Domains","description":"Public API endpoint: ecomBrandLaunch.getReuseDomains\n\n**Required scopes:** `org:ecom:read`","tags":["Commerce Brand Launch"],"x-scopes":["org:ecom:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"launchMode","in":"query","required":false,"schema":{"type":"string","enum":["create_new","extend_existing"]}},{"name":"existingBrandId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"domains":[{"id":"dom_example123","domain":"example.com","verified":true,"brandId":null,"brandName":null}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/reuse-domains' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/reuse-domains', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/reuse-domains',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/domain/{domainId}":{"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: ecomDomain.getById\n\n**Required scopes:** `org:ecom:domain:read`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchBrandLink","summary":"Patch Brand Link","description":"Public API endpoint: ecomDomain.patchBrandLink\n\n**Required scopes:** `org:ecom:domain:write`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"anyOf":[{"type":"string","minLength":1},{"enum":["null"],"nullable":true}]}},"required":["brandId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/commerce-catalog":{"get":{"operationId":"getCommerceCatalog","summary":"Get Commerce Catalog","description":"Public API endpoint: ecomProduct.getCommerceCatalog\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string"}},{"name":"fxValuationDay","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"catalogProduct":{"id":"4dtYvFotyxXQlSwSIZOaYi","orgId":"30xai4apis3cuAPoFPp1u","brandId":null,"title":"Example","slug":"example","description":null,"vendor":null,"productType":null,"tags":[],"status":"draft","isPublishedAtStorefront":true,"omitFromStorefrontCollectionListings":false,"defaultImageUrl":null,"seoTitle":null,"seoDescription":null,"linkedMarketingProductId":"4dtYvFotyxXQlSwSIZOaYk","shopifyProductId":null,"createdAt":"1970-01-01T00:00:00.000Z","updatedAt":"1970-01-01T00:00:00.000Z"},"options":[],"variants":[{"id":"4dtYvFotyxXQlSwSIZOaYm","title":"Default","sku":"SKU-1","option1":null,"option2":null,"option3":null,"position":0,"isDefault":true,"allowNegativeInventory":true,"imageUrl":null,"prices":[{"id":"4dtYvFotyxXQlSwSIZOaYn","variantId":"4dtYvFotyxXQlSwSIZOaYm","currency":"usd","unitAmountMinor":"1999","compareAtAmountMinor":null,"kind":"default","tierKey":null,"isActive":true,"activeFrom":null,"activeUntil":null,"autoConvertUnitFromFx":false}]}],"fxValuation":{"dayISO":"2026-01-01","usdToQuote":{"EUR":"0.92"},"ratesRefreshed":false}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putCommerceCatalog","summary":"Put Commerce Catalog","description":"Public API endpoint: ecomProduct.putCommerceCatalog\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"catalogProduct":{"id":"4dtYvFotyxXQlSwSIZOaYi","orgId":"30xai4apis3cuAPoFPp1u","brandId":null,"title":"Example","slug":"example","description":null,"vendor":null,"productType":null,"tags":[],"status":"draft","isPublishedAtStorefront":true,"omitFromStorefrontCollectionListings":false,"defaultImageUrl":null,"seoTitle":null,"seoDescription":null,"linkedMarketingProductId":"4dtYvFotyxXQlSwSIZOaYk","shopifyProductId":null,"createdAt":"1970-01-01T00:00:00.000Z","updatedAt":"1970-01-01T00:00:00.000Z"},"options":[],"variants":[{"id":"4dtYvFotyxXQlSwSIZOaYm","title":"Default","sku":"SKU-1","option1":null,"option2":null,"option3":null,"position":0,"isDefault":true,"allowNegativeInventory":true,"imageUrl":null,"prices":[{"id":"4dtYvFotyxXQlSwSIZOaYn","variantId":"4dtYvFotyxXQlSwSIZOaYm","currency":"usd","unitAmountMinor":"1999","compareAtAmountMinor":null,"kind":"default","tierKey":null,"isActive":true,"activeFrom":null,"activeUntil":null,"autoConvertUnitFromFx":false}]}],"fxValuation":{"dayISO":"2026-01-01","usdToQuote":{"EUR":"0.92"},"ratesRefreshed":false}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"createIfMissing":{"type":"boolean"},"catalogPatch":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":512},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","draft","archived"]},"isPublishedAtStorefront":{"type":"boolean"},"omitFromStorefrontCollectionListings":{"type":"boolean"}},"additionalProperties":false},"options":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":0,"maximum":2},"name":{"type":"string","minLength":1,"maxLength":128},"values":{"type":"array","items":{"type":"string","maxLength":256},"maxItems":256}},"required":["position","name","values"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"option1":{"type":"string","nullable":true},"option2":{"type":"string","nullable":true},"option3":{"type":"string","nullable":true},"position":{"type":"integer"},"isDefault":{"type":"boolean"},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"string","enum":[""]}],"nullable":true},"allowNegativeInventory":{"type":"boolean"},"initialOnHand":{"type":"integer","minimum":0},"prices":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3},"unitAmountMinor":{"type":"string","pattern":"^[0-9]+$"},"compareAtAmountMinor":{"type":"string","pattern":"^[0-9]+$","nullable":true},"kind":{"type":"string","enum":["default","sale","tier"]},"autoConvertUnitFromFx":{"type":"boolean"}},"required":["currency","unitAmountMinor"],"additionalProperties":false}}},"additionalProperties":false},"minItems":1}},"required":["variants"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/shopify-admin-url":{"get":{"operationId":"getShopifyAdminUrl","summary":"Get Shopify Admin Url","description":"Public API endpoint: ecomProduct.getShopifyAdminUrl\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"url":"https://example.myshopify.com/admin/products/123"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/shopify-admin-url' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/shopify-admin-url', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/shopify-admin-url',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom":{"get":{"operationId":"getForOrg","summary":"Get","description":"Public API endpoint: ecomSettings.getForOrg\n\n**Required scopes:** `org:ecom:settings:read`, `org:ecom:checkout:read`","tags":["Commerce Settings"],"x-scopes":["org:ecom:settings:read","org:ecom:checkout:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","activeLangs":["en","sv"],"primaryLang":"en","defaultStripeIntegrationId":null,"defaultAirwallexIntegrationId":null,"defaultPorkbunIntegrationId":null,"checkoutProvider":"stripe_hosted","mainCurrency":"USD","enabledStorefrontCurrencies":["USD","EUR","SEK"],"activeLangsUnion":["en","sv"],"secondaryLangsForTranslationOps":["sv"],"orderNumberPrefix":null,"orderNumberSeparator":"","orderNumberPadding":4,"orderNumberStartingMinimum":1,"taxPriceMode":"exclusive","taxMode":"disabled","defaultTaxCode":null,"defaultExemptTaxCode":null,"catalogSource":"cognis","discountStackingPolicy":"single_best","cognisDiscountEngineEnabled":false,"allowStripeNativePromotionCodes":true,"wishlistEnabled":true,"wetrackedEnabled":false,"forceCheckoutPathSlug":false,"wishlistMaxItems":null,"productDiscoveryDefaults":null,"skuPrefix":null,"defaultImportInitialOnHand":null,"abandonedCheckoutConfig":{"enabled":true,"steps":[{"delayMinutes":60,"enabled":true},{"delayMinutes":1440,"enabled":true},{"delayMinutes":4320,"enabled":true}]},"klaviyoCheckoutEventsConfig":{"enabled":false,"klaviyoIntegrationId":null,"suppressCognisAbandonedEmails":true}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putForOrg","summary":"Put","description":"Partial-friendly PUT fields: storefront currency pair (`mainCurrency` + `enabledStorefrontCurrencies`) must be supplied together — omit both to preserve existing presets. Omitting Stripe / checkout overrides leaves those columns untouched. Order numbering fields (`orderNumberPrefix`, `orderNumberSeparator`, `orderNumberPadding`, `orderNumberStartingMinimum`) configure how Cognis formats `commerce_orders.order_number` for new storefront orders; each is independently optional and any subset sent must form a valid configuration when merged with the existing column values.\n\n**Required scopes:** `org:ecom:settings:write`, `org:ecom:checkout:write`","tags":["Commerce Settings"],"x-scopes":["org:ecom:settings:write","org:ecom:checkout:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","activeLangs":["en","sv"],"primaryLang":"en","defaultStripeIntegrationId":null,"defaultAirwallexIntegrationId":null,"defaultPorkbunIntegrationId":null,"checkoutProvider":"stripe_hosted","mainCurrency":"USD","enabledStorefrontCurrencies":["USD","EUR","SEK"],"activeLangsUnion":["en","sv"],"secondaryLangsForTranslationOps":["sv"],"orderNumberPrefix":null,"orderNumberSeparator":"","orderNumberPadding":4,"orderNumberStartingMinimum":1,"taxPriceMode":"exclusive","taxMode":"disabled","defaultTaxCode":null,"defaultExemptTaxCode":null,"catalogSource":"cognis","discountStackingPolicy":"single_best","cognisDiscountEngineEnabled":false,"allowStripeNativePromotionCodes":true,"wishlistEnabled":true,"wetrackedEnabled":false,"forceCheckoutPathSlug":false,"wishlistMaxItems":null,"productDiscoveryDefaults":null,"skuPrefix":null,"defaultImportInitialOnHand":null,"abandonedCheckoutConfig":{"enabled":true,"steps":[{"delayMinutes":60,"enabled":true},{"delayMinutes":1440,"enabled":true},{"delayMinutes":4320,"enabled":true}]},"klaviyoCheckoutEventsConfig":{"enabled":false,"klaviyoIntegrationId":null,"suppressCognisAbandonedEmails":true}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activeLangs":{"type":"array","items":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"minItems":1},"primaryLang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"defaultStripeIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"defaultAirwallexIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"defaultPorkbunIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"checkoutProvider":{"type":"string","enum":["shopify_hosted","stripe_hosted","airwallex_hosted"]},"mainCurrency":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","SEK","NOK","DKK","CHF","PLN","CZK"]},"enabledStorefrontCurrencies":{"type":"array","items":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","SEK","NOK","DKK","CHF","PLN","CZK"]},"minItems":1},"orderNumberPrefix":{"type":"string","maxLength":12},"orderNumberSeparator":{"type":"string","maxLength":1},"orderNumberPadding":{"type":"integer","minimum":0,"maximum":8},"orderNumberStartingMinimum":{"type":"integer","minimum":1},"catalogSource":{"type":"string","enum":["shopify","cognis"]},"discountStackingPolicy":{"type":"string","enum":["single_best","stackable","exclusive_codes"]},"cognisDiscountEngineEnabled":{"type":"boolean"},"allowStripeNativePromotionCodes":{"type":"boolean"},"wishlistEnabled":{"type":"boolean"},"wetrackedEnabled":{"type":"boolean"},"forceCheckoutPathSlug":{"type":"boolean"},"productDiscoveryDefaults":{"type":"object","properties":{"defaultCandidateCount":{"type":"integer","minimum":1,"maximum":50},"defaultTargetMarkets":{"type":"array","items":{"type":"string","enum":["EU","US"]}},"marketplacePriority":{"type":"array","items":{"type":"string","enum":["aliexpress"]}},"avoidCategories":{"type":"array","items":{"type":"string"}},"skipShoeItems":{"type":"boolean"},"allowIdeaOnlyCandidates":{"type":"boolean"},"requireAliExpressLink":{"type":"boolean"},"defaultSourcingMode":{"type":"string","enum":["google_cse","model_web_tools"]}},"additionalProperties":false,"nullable":true},"skuPrefix":{"type":"string","maxLength":16,"nullable":true},"defaultImportInitialOnHand":{"type":"integer","minimum":0,"maximum":1000000,"nullable":true},"abandonedCheckoutConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"integer","minimum":5,"maximum":43200},"enabled":{"type":"boolean"}},"required":["delayMinutes","enabled"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["enabled","steps"],"additionalProperties":false},"klaviyoCheckoutEventsConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"klaviyoIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"suppressCognisAbandonedEmails":{"type":"boolean"}},"required":["enabled","klaviyoIntegrationId"],"additionalProperties":false}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/domains":{"get":{"operationId":"list","summary":"List","description":"List org e-commerce domains (admin tables need org:ecom:domain:read). Reference-mode callers skip only that primary scope check for domain pickers (e.g. LAP hosted site bind) — payload is unchanged; confirm org-wide domain visibility is acceptable.\n\n**Required scopes:** `org:ecom:domain:read`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","domain","verified","serviceTarget","records","createdAt","updatedAt","orgId","brandId","createdBy","edgeProvisioningId","edgeProvisioningStatus","launchReadiness"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","domain","verified","serviceTarget","records","createdAt","updatedAt","orgId","brandId","createdBy","edgeProvisioningId","edgeProvisioningStatus","launchReadiness"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","domain","verified","serviceTarget","records","createdAt","updatedAt","orgId","brandId","createdBy","edgeProvisioningId","edgeProvisioningStatus","launchReadiness"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"create","summary":"Create","description":"Public API endpoint: ecomDomain.create\n\n**Required scopes:** `org:ecom:domain:create`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"serviceTarget":{"type":"string","enum":["webshop","lap","design_proposals"],"default":"webshop"},"brandId":{"type":"string","minLength":1}},"required":["domain"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domains',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections":{"get":{"operationId":"list","summary":"List","description":"Public API endpoint: ecomCollection.list\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","orgId","parentId","name","slug","shortDescription","llmDetails","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"id","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","parentId","name","slug","shortDescription","llmDetails","brandIds","createdBy","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","parentId","name","slug","shortDescription","llmDetails","brandIds","createdBy","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"ecoll-1","orgId":"1","parentId":null,"name":"Spring","slug":"spring","shortDescription":"Spring season collection","llmDetails":"Use for seasonal merchandising cues.","brandIds":[],"createdBy":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"create","summary":"Create","description":"Public API endpoint: ecomCollection.create\n\n**Required scopes:** `org:ecom:collections:create`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"ecoll-1","orgId":"1","parentId":null,"name":"Spring","slug":"spring","shortDescription":"Spring season collection","llmDetails":"Use for seasonal merchandising cues.","brandIds":[],"createdBy":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"parentId":{"type":"string","nullable":true},"slug":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"enum":["null"],"nullable":true}]},"shortDescription":{"type":"string","nullable":true},"llmDetails":{"type":"string","nullable":true},"brandIds":{"type":"array","items":{"type":"string"}}},"required":["name"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections/{collectionId}/images":{"get":{"operationId":"listImages","summary":"List Images","description":"Public API endpoint: ecomCollection.listImages\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"eci-1","collectionId":"ecoll-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postImage","summary":"Post Image","description":"Public API endpoint: ecomCollection.postImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"eci-1","collectionId":"ecoll-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileUploadId":{"type":"string"},"brandId":{"type":"string","nullable":true},"lang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"nullable":true},"sortOrder":{"type":"integer","minimum":0}},"required":["fileUploadId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/images',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/collections/{collectionId}/products":{"get":{"operationId":"listProducts","summary":"List Products","description":"Public API endpoint: ecomCollection.listProducts\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"collectionId":"ecoll-1","productId":"prod-1","name":"Example product","brandId":"10","brandName":"Acme","sortOrder":0,"createdAt":"2025-01-01T19:42:28.687Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postProduct","summary":"Post Product","description":"Public API endpoint: ecomCollection.postProduct\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Collections"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"collectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"collectionId":"ecoll-1","productId":"prod-1","name":"Example product","brandId":"10","brandName":"Acme","sortOrder":0,"createdAt":"2025-01-01T19:42:28.687Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","minLength":1}},"required":["productId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/collections/{collectionId}/products',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/translations":{"get":{"operationId":"list","summary":"List","description":"List org-scoped e-commerce content translations (full admin tables require org:ecom:translations:read). Reference-mode callers skip only that primary scope check for storefront/SEO picker loads — payload is unchanged; confirm tenant-wide disclosure is acceptable.\n\n**Required scopes:** `org:ecom:translations:read`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","orgId","entityType","entityId","namespace","tKey","locale","sourceValue","value","format","version","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","entityType","entityId","namespace","tKey","locale","sourceValue","value","format","version","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","entityType","entityId","namespace","tKey","locale","sourceValue","value","format","version","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"etx-sample","orgId":"1","entityType":"product","entityId":"prod-sample","namespace":"ecom","tKey":"title","locale":"sv","sourceValue":"English title","value":"Svensk titel","format":"plain","version":1,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"upsert","summary":"Upsert","description":"Public API endpoint: ecomTranslation.upsert\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"etx-sample","orgId":"1","entityType":"product","entityId":"prod-sample","namespace":"ecom","tKey":"title","locale":"sv","sourceValue":"English title","value":"Svensk titel","format":"plain","version":1,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["product","ecom_collection","brand_storefront","storefront_product_review"]},"entityId":{"type":"string","minLength":1},"tKey":{"type":"string","minLength":1},"locale":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"value":{"type":"string"},"format":{"type":"string","enum":["plain","markdown","icu","richjson"]}},"required":["entityType","entityId","tKey","locale","value","format"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/collections":{"get":{"operationId":"listCollections","summary":"List Collections","description":"Public API endpoint: ecomProduct.listCollections\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"collectionId":"ecoll-1","collectionName":"Spring","collectionSlug":"spring","sortOrder":0,"createdAt":"2025-01-01T19:42:28.687Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collections' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collections', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collections',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/images":{"get":{"operationId":"listImages","summary":"List Images","description":"Public API endpoint: ecomProduct.listImages\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"epi-1","productId":"prod-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"shopifyMediaId":null,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postImage","summary":"Post Image","description":"Public API endpoint: ecomProduct.postImage\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"epi-1","productId":"prod-1","fileUploadId":"fu-1","brandId":null,"lang":null,"sortOrder":0,"shopifyMediaId":null,"filename":"hero.jpg","contentType":"image/jpeg","sizeBytes":12000,"publicCdnUrl":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-01T19:42:28.687Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileUploadId":{"type":"string"},"brandId":{"type":"string","nullable":true},"lang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"nullable":true},"sortOrder":{"type":"integer","minimum":0}},"required":["fileUploadId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/brands/{brandId}/shopify-import-catalog":{"get":{"operationId":"listShopifyImportCatalog","summary":"List Shopify Import Catalog","description":"Public API endpoint: orgBrand.listShopifyImportCatalog\n\n**Required scopes:** `org:ecom:collections:read`, `org:integrations:read`","tags":["Brand"],"x-scopes":["org:ecom:collections:read","org:integrations:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["createdAt","updatedAt","name","id"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name"]},"default":["id"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","name":"Shopify"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import-catalog' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import-catalog', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import-catalog',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/collection-candidates":{"get":{"operationId":"listCollectionCandidates","summary":"List Collection Candidates","description":"Public API endpoint: ecomProduct.listCollectionCandidates\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"ecoll-2","name":"Summer","slug":"summer"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collection-candidates' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collection-candidates', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/collection-candidates',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs":{"get":{"operationId":"listVariantFinanceCosts","summary":"List Variant Finance Costs","description":"Public API endpoint: ecomCommerce.listVariantFinanceCosts\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Catalog"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"commerceVariantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"fvc_example123","commerceVariantId":"cpv_example456","sku":"SKU-001","costAmount":"12.5000","currency":"USD","validFrom":"2026-01-01T00:00:00.000Z","validTo":null,"source":"manual","sourceRef":null,"createdAt":"2026-01-01T00:00:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postVariantFinanceCost","summary":"Post Variant Finance Cost","description":"Public API endpoint: ecomCommerce.postVariantFinanceCost\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Catalog"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"commerceVariantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"fvc_example123","commerceVariantId":"cpv_example456","sku":"SKU-001","costAmount":"12.5000","currency":"USD","validFrom":"2026-01-01T00:00:00.000Z","validTo":null,"source":"manual","sourceRef":null,"createdAt":"2026-01-01T00:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"costAmount":{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$"},"currency":{"type":"string","minLength":3,"maxLength":3},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string","enum":["manual","product_ingest","import_csv","api"]},"sourceRef":{"type":"string","maxLength":512,"nullable":true}},"required":["costAmount","currency"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/variants/{commerceVariantId}/finance-variant-costs',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/sourcing-links":{"get":{"operationId":"listSourcingLinks","summary":"List Sourcing Links","description":"Public API endpoint: ecomProduct.listSourcingLinks\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"psl_example123","type":"url","url":"https://www.aliexpress.com/item/1005008806380297.html","marketplace":"aliexpress","costAmount":12.5,"costCurrency":"usd","createdAt":"2026-01-01T00:00:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putSourcingLinks","summary":"Put Sourcing Links","description":"Public API endpoint: ecomProduct.putSourcingLinks\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"psl_example123","type":"url","url":"https://www.aliexpress.com/item/1005008806380297.html","marketplace":"aliexpress","costAmount":12.5,"costCurrency":"usd","createdAt":"2026-01-01T00:00:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["url"],"default":"url"},"url":{"type":"string","format":"uri","maxLength":2048},"marketplace":{"type":"string","maxLength":32,"nullable":true},"costAmount":{"type":"number","exclusiveMinimum":true,"minimum":0,"nullable":true},"costCurrency":{"type":"string","minLength":3,"maxLength":3,"nullable":true}},"required":["url"],"additionalProperties":false},"maxItems":20}},"required":["links"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sourcing-links',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/product-summaries":{"get":{"operationId":"listSummaries","summary":"List Summaries","description":"Public API endpoint: ecomProduct.listSummaries\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"excludeCollectionId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"prod-1","name":"Example product","slug":"example-product","brandId":"10","brandName":"Acme"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/product-summaries' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/product-summaries', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/product-summaries',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products":{"get":{"operationId":"list","summary":"List","description":"Public API endpoint: ecomProduct.list\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","slug","brandId","orgId","integrationType","externalId","externalHandle","createdAt","updatedAt","description","createdBy"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","slug","brandId","orgId","integrationType","externalId","externalHandle","createdAt","updatedAt","description","createdBy"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","name","slug","brandId","orgId","integrationType","externalId","externalHandle","createdAt","updatedAt","description","createdBy"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","name":"Product 1","description":"Example Product Description","slug":"product-1","integrationType":"shopify","externalId":"213120","externalHandle":"product-handle","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","brandId":"1","orgId":"1","createdBy":null},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/domain/{domainId}/purchase-policy":{"patch":{"operationId":"patchPurchasePolicy","summary":"Patch Purchase Policy","description":"Update Cognis-purchased domain renewal policy (Keep domain toggle, auto-cancel before renewal). Org admin tier only.\n\n**Required scopes:** `org:ecom:domain:write`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keepDomain":{"type":"boolean"},"renewalPolicy":{"type":"string","enum":["auto_cancel_before_renewal","leave_registrar_unchanged"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/purchase-policy' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/purchase-policy', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/purchase-policy',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/automation/brand-launch/domain-search":{"post":{"operationId":"postDomainSearch","summary":"Post Domain Search","description":"Public API endpoint: ecomBrandLaunch.postDomainSearch\n\n**Required scopes:** `org:ecom:read`","tags":["Commerce Brand Launch"],"x-scopes":["org:ecom:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"results":[{"domain":"freshbrand","tld":"com","fqdn":"freshbrand.com","available":true,"price":9.68,"currency":"USD"}],"partialFailures":[{"tld":"store","code":"PORKBUN_API_ERROR","message":"Rate limit exceeded"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":253},"tlds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":63},"maxItems":8},"porkbunIntegrationId":{"type":"string","minLength":1}},"required":["query"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/domain-search' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/domain-search', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/domain-search',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/automation/brand-launch/preview-collections":{"post":{"operationId":"postPreviewCollections","summary":"Post Preview Collections","description":"Public API endpoint: ecomBrandLaunch.postPreviewCollections\n\n**Required scopes:** `org:ecom:read`","tags":["Commerce Brand Launch"],"x-scopes":["org:ecom:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"collections":[{"id":"ecoll_example","name":"Outdoor gear","score":120,"rationale":"name keywords: outdoor","suggested":true}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandName":{"type":"string","minLength":1,"maxLength":256},"brandDescription":{"type":"string","maxLength":4000},"brandSlug":{"type":"string","maxLength":64},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["brandName"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/preview-collections' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/preview-collections', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/automation/brand-launch/preview-collections',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/brands/{brandId}/shopify-import":{"post":{"operationId":"postShopifyProductImport","summary":"Post Shopify Product Import","description":"Public API endpoint: orgBrand.postShopifyProductImport\n\n**Required scopes:** `org:ecom:collections:write`, `org:integrations:read`","tags":["Brand"],"x-scopes":["org:ecom:collections:write","org:integrations:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"results":[{"id":"1","success":true}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productImport":{"type":"array","items":{"type":"string"}}},"required":["productImport"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/brands/{brandId}/shopify-import',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/commerce-catalog/sku-check":{"post":{"operationId":"postSkuCheck","summary":"Post Sku Check","description":"Public API endpoint: ecomCommerce.postSkuCheck\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Catalog"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"conflicts":["ACME-001"]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skus":{"type":"array","items":{"type":"string","maxLength":128},"maxItems":200},"excludeCommerceProductId":{"type":"string"},"excludeLinkedMarketingProductId":{"type":"string"}},"required":["skus"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/sku-check' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/sku-check', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce-catalog/sku-check',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/manual-product":{"post":{"operationId":"createManual","summary":"Create Manual","description":"Public API endpoint: ecomProduct.createManual\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","name":"Product 1","description":"Example Product Description","slug":"product-1","integrationType":"shopify","externalId":"213120","externalHandle":"product-handle","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","brandId":"1","orgId":"1","createdBy":null},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"storefrontHandleHint":{"type":"string","maxLength":512},"brandId":{"type":"string","minLength":1},"ecomDescription":{"type":"string","maxLength":20000}},"required":["name"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/manual-product' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/manual-product', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/manual-product',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/commerce-catalog/fill-prices-from-fx":{"post":{"operationId":"fillCommerceCatalogPricesFromFx","summary":"Fill Commerce Catalog Prices From Fx","description":"Public API endpoint: ecomProduct.fillCommerceCatalogPricesFromFx\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"prices":[{"currency":"EUR","unitAmountMinor":"1840"}],"valuationDay":"2026-01-01","ratesRefreshed":false,"fxValuation":{"dayISO":"2026-01-01","usdToQuote":{"EUR":"0.92"},"ratesRefreshed":false}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"anchorCurrency":{"allOf":[{"type":"string"},{"type":"string","pattern":"^[A-Z]{3}$"}]},"anchorUnitAmountMinor":{"type":"string","pattern":"^[0-9]+$"},"dayISO":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["anchorCurrency","anchorUnitAmountMinor"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog/fill-prices-from-fx' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog/fill-prices-from-fx', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/commerce-catalog/fill-prices-from-fx',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/ecom-translations/seed-from-primary":{"post":{"operationId":"seedTranslationsFromPrimary","summary":"Seed Translations From Primary","description":"Public API endpoint: ecomProduct.seedTranslationsFromPrimary\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"written":0,"skippedSlugConflicts":0,"skippedNoSource":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/seed-from-primary' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/seed-from-primary', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-translations/seed-from-primary',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/domain/{domainId}/service-target":{"patch":{"operationId":"setServiceTargetDeprecatedGone","summary":"Set Service Target Deprecated Gone","description":"Public API endpoint: ecomDomain.setServiceTargetDeprecatedGone\n\n**Required scopes:** `org:ecom:domain:write`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/service-target' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/service-target', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/service-target',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/images/sync-shopify":{"post":{"operationId":"syncImagesFromShopify","summary":"Sync Images From Shopify","description":"Public API endpoint: ecomProduct.syncImagesFromShopify\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"synced":3,"shopifyMediaTotal":5,"skippedDownloads":0,"syncCap":50},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/sync-shopify' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/sync-shopify', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/images/sync-shopify',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/translations/batch":{"post":{"operationId":"upsertMany","summary":"Upsert Many","description":"Public API endpoint: ecomTranslation.upsertMany\n\n**Required scopes:** `org:ecom:translations:write`","tags":["Commerce Translations"],"x-scopes":["org:ecom:translations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"items":[{"id":"etx-sample","orgId":"1","entityType":"product","entityId":"prod-sample","namespace":"ecom","tKey":"title","locale":"sv","sourceValue":"English title","value":"Svensk titel","format":"plain","version":1,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["product","ecom_collection","brand_storefront","storefront_product_review"]},"entityId":{"type":"string","minLength":1},"tKey":{"type":"string","minLength":1},"locale":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"value":{"type":"string"},"format":{"type":"string","enum":["plain","markdown","icu","richjson"]}},"required":["entityType","entityId","tKey","locale","value","format"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["items"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/batch' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/batch', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/translations/batch',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/domain/{domainId}/verify":{"post":{"operationId":"verify","summary":"Verify","description":"Public API endpoint: ecomDomain.verify\n\n**Required scopes:** `org:ecom:domain:write`","tags":["Commerce Domains"],"x-scopes":["org:ecom:domain:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"verified":true,"domain":{"id":"1","domain":"acme.com","verified":true,"serviceTarget":"webshop","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","brandId":"10","createdBy":null,"edgeProvisioningId":null,"edgeProvisioningStatus":null,"records":[{"type":"A","value":"192.168.1.1"},{"type":"CNAME","value":"edge.example.com","name":"www"}]}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/verify' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/verify', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/domain/{domainId}/verify',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}":{"delete":{"operationId":"delete","summary":"Delete","description":"Public API endpoint: lapHostedSites.delete\n\n**Required scopes:** `org:lap:sites:create`","tags":["LAP Hosted Sites"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: lapHostedSites.getById\n\n**Required scopes:** `org:lap:sites:read`","tags":["LAP Hosted Sites"],"x-scopes":["org:lap:sites:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801","orgId":"1","ecomDomainId":"902","domain":"example.com","siteSegment":"example-com","displayName":"Main campaign","siteWideFaviconAt":null,"createdAt":"2026-08-19T08:40:32.663Z","updatedAt":"2026-08-19T08:40:32.663Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites":{"get":{"operationId":"list","summary":"List","description":"Public API endpoint: lapHostedSites.list\n\n**Required scopes:** `org:lap:sites:read`","tags":["LAP Hosted Sites"],"x-scopes":["org:lap:sites:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["domain","siteSegment","displayName","siteWideFaviconAt","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"domain","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","ecomDomainId","domain","siteSegment","displayName","siteWideFaviconAt","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","ecomDomainId","domain","siteSegment","displayName","siteWideFaviconAt","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"801","orgId":"1","ecomDomainId":"902","domain":"example.com","siteSegment":"example-com","displayName":"Main campaign","siteWideFaviconAt":null,"createdAt":"2026-08-19T08:40:32.663Z","updatedAt":"2026-08-19T08:40:32.663Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"create","summary":"Create","description":"Public API endpoint: lapHostedSites.create\n\n**Required scopes:** `org:lap:sites:create`","tags":["LAP Hosted Sites"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801","orgId":"1","ecomDomainId":"902","domain":"example.com","siteSegment":"example-com","displayName":"Main campaign","siteWideFaviconAt":null,"createdAt":"2026-08-19T08:40:32.663Z","updatedAt":"2026-08-19T08:40:32.663Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domainId":{"type":"string","minLength":1},"displayName":{"type":"string","maxLength":255}},"required":["domainId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}/html":{"get":{"operationId":"getLapHostedSiteHtml","summary":"Get Lap Hosted Site Html","description":"Public API endpoint: org.getLapHostedSiteHtml\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"relativePath":"index.html","htmlUtf8":"<html></html>","objectGeneration":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putLapHostedSiteHtml","summary":"Put Lap Hosted Site Html","description":"Public API endpoint: org.putLapHostedSiteHtml\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"objectKey":"tenants/1/sites/example-com/index.html","bytes":128,"contentType":"text/html; charset=utf-8","relativePath":"index.html","objectGeneration":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relativePath":{"type":"string","minLength":1,"maxLength":1024},"bodyUtf8":{"type":"string","minLength":1},"objectGeneration":{"type":"string","pattern":"^\\d+$"},"confirmReplaceHomepage":{"type":"boolean"}},"required":["relativePath","bodyUtf8","objectGeneration"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/html',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image":{"get":{"operationId":"getLapHostedSiteOgImage","summary":"Get Lap Hosted Site Og Image","description":"Public API endpoint: org.getLapHostedSiteOgImage\n\n**Required scopes:** `org:lap:sites:read`","tags":["Org"],"x-scopes":["org:lap:sites:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"relativePath":"og-image.png","contentType":"image/png","bytesBase64":"AA==","objectGeneration":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putLapHostedSiteOgImage","summary":"Put Lap Hosted Site Og Image","description":"Public API endpoint: org.putLapHostedSiteOgImage\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"objectKey":"tenants/1/sites/example-com/index.html","bytes":128,"contentType":"image/png","relativePath":"og-image.png","objectGeneration":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relativePath":{"type":"string","minLength":1,"maxLength":1024},"bytesBase64":{"type":"string","minLength":1},"objectGeneration":{"type":"string","pattern":"^\\d+$"}},"required":["relativePath","bytesBase64","objectGeneration"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-image',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}/files":{"get":{"operationId":"listLapHostedSiteFiles","summary":"List Lap Hosted Site Files","description":"Public API endpoint: org.listLapHostedSiteFiles\n\n**Required scopes:** `org:lap:sites:read`","tags":["Org"],"x-scopes":["org:lap:sites:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"items":[{"relativePath":"index.html","size":128,"contentType":"text/html; charset=utf-8"}],"truncated":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"uploadLapHostedSiteFiles","summary":"Upload Lap Hosted Site Files","description":"Public API endpoint: org.uploadLapHostedSiteFiles\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"uploaded":[{"objectKey":"tenants/1/sites/example-com/index.html","bytes":128,"contentType":"text/html; charset=utf-8","relativePath":"index.html","objectGeneration":"1"}],"failures":[]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"relativePath":{"type":"string","minLength":1,"maxLength":1024},"contentType":{"type":"string","minLength":1,"maxLength":255},"bytesBase64":{"type":"string","minLength":1}},"required":["relativePath","contentType","bytesBase64"],"additionalProperties":false},"minItems":1,"maxItems":500}},"required":["files"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-regenerate":{"post":{"operationId":"regenerateLapHostedSiteOg","summary":"Regenerate Lap Hosted Site Og","description":"Public API endpoint: org.regenerateLapHostedSiteOg\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"metaSynced":1,"metaFailed":0,"metaOmittedDueToCap":0,"totalIndexPages":1,"rootMissing":false,"canonicalImageUrl":"https://example.com/og-image.png","ogRasterOk":true,"ogRasterReason":"ok","faviconOk":1,"faviconSkipped":0,"faviconFailed":0,"faviconAttempted":1,"faviconCapped":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-regenerate' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-regenerate', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/og-regenerate',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/lap/hosted-sites/{lapSiteId}/files/index":{"post":{"operationId":"uploadLapHostedSiteDirectoryIndex","summary":"Upload Lap Hosted Site Directory Index","description":"Public API endpoint: org.uploadLapHostedSiteDirectoryIndex\n\n**Required scopes:** `org:lap:sites:create`","tags":["Org"],"x-scopes":["org:lap:sites:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"lapSiteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"objectKey":"tenants/1/sites/example-com/index.html","bytes":128,"contentType":"text/html; charset=utf-8","relativePath":"index.html","objectGeneration":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"directoryPath":{"type":"string","maxLength":1024},"confirmReplaceHomepage":{"type":"boolean"},"contentType":{"type":"string","minLength":1,"maxLength":255},"bytesBase64":{"type":"string","minLength":1}},"required":["directoryPath","contentType","bytesBase64"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files/index' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files/index', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/lap/hosted-sites/{lapSiteId}/files/index',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/docs":{"get":{"operationId":"listDocLibrariesForOrg","summary":"List Doc Libraries","description":"List documentation libraries for an org.\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","description","slug","visibility","status","createdAt","updatedAt","orgId"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","slug","visibility","status","createdAt","updatedAt","orgId"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","name","description","slug","visibility","status","createdAt","updatedAt","orgId"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"30","name":"Getting Started","description":"Onboarding documentation and quickstart guides","slug":"getting-started","visibility":"private","status":"draft","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/docs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/docs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/docs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postDocLibraryForOrg","summary":"Post Doc Library","description":"Create a documentation library for an org.\n\n**Required scopes:** `org:docs:create`","tags":["Docs"],"x-scopes":["org:docs:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"30","name":"Getting Started","description":"Onboarding documentation and quickstart guides","slug":"getting-started","visibility":"private","status":"draft","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"slug":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","organization","public","app_lock"]},"status":{"type":"string","enum":["draft","published"]}},"required":["name","slug","visibility"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/docs' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/docs', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/docs',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/commerce/orders":{"get":{"operationId":"listOrdersForOrg","summary":"List Orders","description":"List Cognis OLTP storefront orders for an organization (all brands).\n\n**Required scopes:** `org:ecom:collections:read`","tags":["Commerce Catalog"],"x-scopes":["org:ecom:collections:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"placedAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["placedAt","orderNumber","brandName","financialStatus","internalStatus","totalMinor"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"placedAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","brandId","brandName","orderNumber","orderSequence","source","financialStatus","fulfillmentStatus","internalStatus","internalStatusNote","cancelledAt","cancelReason","cancelledByUserId","requiresInventoryReview","inventoryReviewReason","email","currency","subtotalMinor","taxMinor","shippingMinor","discountMinor","totalMinor","amountRefundedMinor","stripeCheckoutSessionId","stripePaymentIntentId","stripeIntegrationId","livemode","placedAt","processedAt","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","brandId","brandName","orderNumber","orderSequence","source","financialStatus","fulfillmentStatus","internalStatus","internalStatusNote","cancelledAt","cancelReason","cancelledByUserId","requiresInventoryReview","inventoryReviewReason","email","currency","subtotalMinor","taxMinor","shippingMinor","discountMinor","totalMinor","amountRefundedMinor","stripeCheckoutSessionId","stripePaymentIntentId","stripeIntegrationId","livemode","placedAt","processedAt","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}},{"name":"commerceProductId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"financialStatus","in":"query","required":false,"schema":{"type":"string","enum":["pending","paid","partially_refunded","refunded","voided","failed"]}},{"name":"internalStatus","in":"query","required":false,"schema":{"type":"string","enum":["open","requires_review","on_hold","closed","cancelled"]}},{"name":"requiresInventoryReview","in":"query","required":false,"schema":{"type":"string","enum":["1","true"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce/orders' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce/orders', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/commerce/orders',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/abandoned-checkout-stats":{"get":{"operationId":"getAbandonedCheckoutStats","summary":"Get Abandoned Checkout Stats","description":"Public API endpoint: ecomCheckout.getAbandonedCheckoutStats\n\n**Required scopes:** `org:ecom:settings:read`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"windowDays","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":30}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"windowDays":30,"attemptsWithEmail":12,"sendsByStep":[{"stepIndex":0,"count":8},{"stepIndex":1,"count":3}],"recoveries":2,"pendingInPipeline":4,"totalEmailsSent":11},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/abandoned-checkout-stats' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/abandoned-checkout-stats', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/abandoned-checkout-stats',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/klaviyo-checkout-events/test":{"post":{"operationId":"postKlaviyoCheckoutTestEventsForOrg","summary":"Post Klaviyo Checkout Test Events","description":"Public API endpoint: org.postKlaviyoCheckoutTestEventsForOrg\n\n**Required scopes:** `org:ecom:settings:write`","tags":["Org"],"x-scopes":["org:ecom:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"event":"started_checkout","uniqueId":"started_checkout_test_1710000000000","checkoutUrl":"https://example.com/checkout/cognis-klaviyo-test?recover=test"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"event":{"type":"string","enum":["started_checkout","placed_order"]},"klaviyoIntegrationId":{"type":"string","minLength":1}},"required":["email","event","klaviyoIntegrationId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/klaviyo-checkout-events/test' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/klaviyo-checkout-events/test', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/klaviyo-checkout-events/test',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-intercept/setup-context":{"get":{"operationId":"getCheckoutInterceptSetupContextForOrg","summary":"Get Checkout Intercept Setup Context","description":"Public API endpoint: org.getCheckoutInterceptSetupContextForOrg\n\n**Required scopes:** `org:ecom:checkout:read`, `org:ecom:settings:read`","tags":["Org"],"x-scopes":["org:ecom:checkout:read","org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"integrationsWithStorefrontToken":["int_ghi789"],"brandContexts":[{"brandId":"br_def456","primaryWebshopCheckoutOrigin":"https://checkout.example.com"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/setup-context' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/setup-context', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/setup-context',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-intercept/pixels":{"get":{"operationId":"listInterceptPixels","summary":"List Intercept Pixels","description":"Public API endpoint: ecomCheckout.listInterceptPixels\n\n**Required scopes:** `org:ecom:checkout:read`, `org:ecom:settings:read`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:read","org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"cip_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"localStorageGateKey":null,"localStorageGateValue":null,"interceptTrafficPercent":100,"shopHandle":"example-store","brandName":"Example Brand","primaryWebshopCheckoutOrigin":"https://checkout.example.com"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postInterceptPixel","summary":"Post Intercept Pixel","description":"Public API endpoint: ecomCheckout.postInterceptPixel\n\n**Required scopes:** `org:ecom:checkout:write`, `org:ecom:settings:write`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:write","org:ecom:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"cip_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"localStorageGateKey":null,"localStorageGateValue":null,"interceptTrafficPercent":100,"shopHandle":"example-store","brandName":"Example Brand","primaryWebshopCheckoutOrigin":"https://checkout.example.com"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"shopifyIntegrationId":{"type":"string","minLength":1}},"required":["brandId","shopifyIntegrationId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-intercept/shopify-storefront-token":{"post":{"operationId":"postShopifyStorefrontToken","summary":"Post Shopify Storefront Token","description":"Public API endpoint: ecomCheckout.postShopifyStorefrontToken\n\n**Required scopes:** `org:ecom:checkout:write`, `org:ecom:settings:write`, `org:integrations:write`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:write","org:ecom:settings:write","org:integrations:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"shopifyIntegrationId":"int_ghi789","hasStorefrontToken":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shopifyIntegrationId":{"type":"string","minLength":1}},"required":["shopifyIntegrationId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/shopify-storefront-token' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/shopify-storefront-token', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/shopify-storefront-token',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-intercept/pixels/{pixelId}":{"put":{"operationId":"putInterceptPixel","summary":"Put Intercept Pixel","description":"Public API endpoint: ecomCheckout.putInterceptPixel\n\n**Required scopes:** `org:ecom:checkout:write`, `org:ecom:settings:write`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:write","org:ecom:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"pixelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"cip_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"localStorageGateKey":null,"localStorageGateValue":null,"interceptTrafficPercent":100,"shopHandle":"example-store","brandName":"Example Brand","primaryWebshopCheckoutOrigin":"https://checkout.example.com"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"brandId":{"type":"string","minLength":1},"localStorageGateKey":{"type":"string","maxLength":128,"nullable":true},"localStorageGateValue":{"type":"string","maxLength":256,"nullable":true},"interceptTrafficPercent":{"type":"integer","minimum":0,"maximum":100}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels/{pixelId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels/{pixelId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-intercept/pixels/{pixelId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-tracking/readiness":{"get":{"operationId":"listTrackingReadiness","summary":"List Tracking Readiness","description":"Public API endpoint: ecomCheckout.listTrackingReadiness\n\n**Required scopes:** `org:ecom:checkout:read`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"brandId":"br_def456","brandName":"Example Brand","interceptPixelStatus":"enabled","ga4TagStatus":"active","metaConfigured":true,"tripleWhaleEnabled":false}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-tracking/readiness' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-tracking/readiness', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-tracking/readiness',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-order-push/attempts":{"get":{"operationId":"listOrderPushAttempts","summary":"List Order Push Attempts","description":"Public API endpoint: ecomCheckout.listOrderPushAttempts\n\n**Required scopes:** `org:ecom:checkout:read`, `org:ecom:settings:read`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:read","org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"atmp_abc123","commerceOrderId":"ord_def456","cognisOrderNumber":"WB0042","brandId":"br_ghi789","shopifyIntegrationId":"int_jkl012","status":"succeeded","shopifyOrderName":"#1042","lastErrorCode":null,"lastErrorMessage":null,"attemptCount":1,"createdAt":"2026-06-26T12:00:00.000Z","updatedAt":"2026-06-26T12:00:01.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/attempts' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/attempts', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/attempts',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-order-push/configs":{"get":{"operationId":"listOrderPushConfigs","summary":"List Order Push Configs","description":"Public API endpoint: ecomCheckout.listOrderPushConfigs\n\n**Required scopes:** `org:ecom:checkout:read`, `org:ecom:settings:read`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:read","org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"cop_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"pushOnPaymentSuccess":true,"completeShopifyDraftOrder":true,"markShopifyOrderAsPaid":true,"includePaymentProviderLinks":true,"includeCognisOrderLink":true,"includeAttributionAttributes":true,"shopifySourceName":"cognis","notifyShopifyCustomer":false,"shopHandle":"example-store","brandName":"Example Brand","thankYouOrderNumberSource":"shopify"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postOrderPushConfig","summary":"Post Order Push Config","description":"Public API endpoint: ecomCheckout.postOrderPushConfig\n\n**Required scopes:** `org:ecom:checkout:write`, `org:ecom:settings:write`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:write","org:ecom:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"cop_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"pushOnPaymentSuccess":true,"completeShopifyDraftOrder":true,"markShopifyOrderAsPaid":true,"includePaymentProviderLinks":true,"includeCognisOrderLink":true,"includeAttributionAttributes":true,"shopifySourceName":"cognis","notifyShopifyCustomer":false,"shopHandle":"example-store","brandName":"Example Brand","thankYouOrderNumberSource":"shopify"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"shopifyIntegrationId":{"type":"string","minLength":1}},"required":["brandId","shopifyIntegrationId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/checkout-order-push/configs/{configId}":{"put":{"operationId":"putOrderPushConfig","summary":"Put Order Push Config","description":"Public API endpoint: ecomCheckout.putOrderPushConfig\n\n**Required scopes:** `org:ecom:checkout:write`, `org:ecom:settings:write`","tags":["Commerce Checkout"],"x-scopes":["org:ecom:checkout:write","org:ecom:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"configId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"cop_abc123","brandId":"br_def456","shopifyIntegrationId":"int_ghi789","enabled":true,"pushOnPaymentSuccess":true,"completeShopifyDraftOrder":true,"markShopifyOrderAsPaid":true,"includePaymentProviderLinks":true,"includeCognisOrderLink":true,"includeAttributionAttributes":true,"shopifySourceName":"cognis","notifyShopifyCustomer":false,"shopHandle":"example-store","brandName":"Example Brand","thankYouOrderNumberSource":"shopify"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"pushOnPaymentSuccess":{"type":"boolean"},"completeShopifyDraftOrder":{"type":"boolean"},"markShopifyOrderAsPaid":{"type":"boolean"},"includePaymentProviderLinks":{"type":"boolean"},"includeCognisOrderLink":{"type":"boolean"},"includeAttributionAttributes":{"type":"boolean"},"shopifySourceName":{"type":"string","maxLength":64,"nullable":true},"notifyShopifyCustomer":{"type":"boolean"},"thankYouOrderNumberSource":{"type":"string","enum":["cognis","shopify"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs/{configId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs/{configId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/checkout-order-push/configs/{configId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/storefront-product-reviews/pending":{"get":{"operationId":"listPending","summary":"List Pending","description":"Public API endpoint: ecomReviews.listPending\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Reviews"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"rows":[],"nextCursor":null},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/pending' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/pending', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/pending',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/moderation":{"patch":{"operationId":"patchModeration","summary":"Patch Moderation","description":"Public API endpoint: ecomReviews.patchModeration\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Reviews"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"reviewId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["approved","rejected"]}},"required":["status"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/moderation' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/moderation', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/moderation',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/integration-sync-health":{"get":{"operationId":"list","summary":"List","description":"Public API endpoint: ecomIntegrationHealth.list\n\n**Required scopes:** `org:ecom:settings:read`","tags":["Commerce Integration Health"],"x-scopes":["org:ecom:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"errorLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"rows":[]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/integration-sync-health' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/integration-sync-health', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/integration-sync-health',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/blog/authors/{blogAuthorId}":{"delete":{"operationId":"deleteAuthor","summary":"Delete Author","description":"Public API endpoint: orgBlog.deleteAuthor\n\n**Required scopes:** `org:blog:delete`","tags":["Org"],"x-scopes":["org:blog:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogAuthorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"501"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getAuthor","summary":"Get Author","description":"Public API endpoint: orgBlog.getAuthor\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogAuthorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"501","orgId":"1","brandId":"10","displayName":"Jane Writer","slug":"jane-writer","bio":"Senior content lead.","avatarUrl":null,"wpAuthorIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchAuthor","summary":"Patch Author","description":"Public API endpoint: orgBlog.patchAuthor\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogAuthorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"501","orgId":"1","brandId":"10","displayName":"Jane Writer","slug":"jane-writer","bio":"Senior content lead.","avatarUrl":null,"wpAuthorIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"displayName":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"bio":{"type":"string","maxLength":2000,"nullable":true},"avatarUrl":{"type":"string","format":"uri","nullable":true},"status":{"type":"string","enum":["active","archived"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors/{blogAuthorId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/categories/{blogCategoryId}":{"delete":{"operationId":"deleteCategory","summary":"Delete Category","description":"Public API endpoint: orgBlog.deleteCategory\n\n**Required scopes:** `org:blog:delete`","tags":["Org"],"x-scopes":["org:blog:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"601"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getCategory","summary":"Get Category","description":"Public API endpoint: orgBlog.getCategory\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"601","orgId":"1","brandId":"10","name":"Marketing","slug":"marketing","description":"All marketing-related posts.","heroImageUrl":null,"heroImageAlt":null,"seoTitle":null,"seoDescription":null,"wpCategoryIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchCategory","summary":"Patch Category","description":"Public API endpoint: orgBlog.patchCategory\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"601","orgId":"1","brandId":"10","name":"Marketing","slug":"marketing","description":"All marketing-related posts.","heroImageUrl":null,"heroImageAlt":null,"seoTitle":null,"seoDescription":null,"wpCategoryIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":2000,"nullable":true},"heroImageUrl":{"type":"string","maxLength":4096,"nullable":true},"heroImageAlt":{"type":"string","maxLength":500,"nullable":true},"seoTitle":{"type":"string","maxLength":255,"nullable":true},"seoDescription":{"type":"string","maxLength":500,"nullable":true},"status":{"type":"string","enum":["active","archived"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories/{blogCategoryId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts/{blogPostId}":{"delete":{"operationId":"deletePost","summary":"Delete Post","description":"Public API endpoint: orgBlog.deletePost\n\n**Required scopes:** `org:blog:delete`","tags":["Org"],"x-scopes":["org:blog:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getPost","summary":"Get Post","description":"Public API endpoint: orgBlog.getPost\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801","orgId":"1","brandId":"10","authorId":"501","status":"draft","title":"How AI is reshaping ecommerce","slug":"how-ai-is-reshaping-ecommerce","excerpt":"A short tour of practical AI in ecommerce.","intro":null,"content":[],"keywords":["ai","ecommerce"],"heroImageUrl":null,"heroImageAlt":null,"heroImageMeta":null,"seoTitle":null,"seoDescription":null,"scheduledAt":null,"publishedAt":null,"baseLang":"en","createdByUserId":null,"aiRunId":null,"citationAllowlistKeys":null,"categoryIds":["601"],"tagIds":["701"],"productIds":["901"],"translations":[],"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchPost","summary":"Patch Post","description":"Public API endpoint: orgBlog.patchPost\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801","orgId":"1","brandId":"10","authorId":"501","status":"draft","title":"How AI is reshaping ecommerce","slug":"how-ai-is-reshaping-ecommerce","excerpt":"A short tour of practical AI in ecommerce.","intro":null,"content":[],"keywords":["ai","ecommerce"],"heroImageUrl":null,"heroImageAlt":null,"heroImageMeta":null,"seoTitle":null,"seoDescription":null,"scheduledAt":null,"publishedAt":null,"baseLang":"en","createdByUserId":null,"aiRunId":null,"citationAllowlistKeys":null,"categoryIds":["601"],"tagIds":["701"],"productIds":["901"],"translations":[],"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"authorId":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":512},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"excerpt":{"type":"string","maxLength":2000,"nullable":true},"intro":{"type":"string","maxLength":4000,"nullable":true},"content":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"maxItems":8000,"default":[]},"keywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50,"default":[]},"heroImageUrl":{"type":"string","maxLength":4096,"nullable":true},"heroImageAlt":{"type":"string","maxLength":500,"nullable":true},"heroImageMeta":{"type":"object","additionalProperties":{},"nullable":true},"seoTitle":{"type":"string","maxLength":255,"nullable":true},"seoDescription":{"type":"string","maxLength":500,"nullable":true},"baseLang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"default":"en"},"status":{"type":"string","enum":["idea","draft","revision","approval","scheduled","published","archived"],"default":"draft"},"scheduledAt":{"type":"string","format":"date-time"},"categoryIds":{"type":"array","items":{"type":"string"},"default":[]},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"productIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":12,"default":[]},"revisionFeedback":{"type":"string","maxLength":8000,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/tags/{blogTagId}":{"delete":{"operationId":"deleteTag","summary":"Delete Tag","description":"Public API endpoint: orgBlog.deleteTag\n\n**Required scopes:** `org:blog:delete`","tags":["Org"],"x-scopes":["org:blog:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogTagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"701"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getTag","summary":"Get Tag","description":"Public API endpoint: orgBlog.getTag\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogTagId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"701","orgId":"1","brandId":"10","name":"AI","slug":"ai","wpTagIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags/{blogTagId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts/{blogPostId}/generate":{"post":{"operationId":"generatePostAi","summary":"Generate Post Ai","description":"Public API endpoint: orgBlog.generatePostAi\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"postId":"801","aiRunId":"ai-run-1","phase":"full","status":"queued"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phase":{"type":"string","enum":["outline","research","draft","final-copy","image-meta","hero-image"]},"input":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":500},"outlineNotes":{"type":"string","maxLength":8000},"researchQuestions":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":20},"keywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50},"heroImageInstructions":{"type":"string","maxLength":1500}},"additionalProperties":false},"aiRunId":{"type":"string"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/generate' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/generate', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/generate',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/config":{"get":{"operationId":"getConfig","summary":"Get Config","description":"Public API endpoint: orgBlog.getConfig\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"voice":"Authoritative, friendly, no fluff.","tone":"Punchy in intros, factual in body.","targetAudience":"DTC ecommerce founders shipping consumer products in EU/US.","styleGuidelines":"Lead with a hook. Use short paragraphs. Cite primary sources.","bannedPhrases":["in conclusion","in today's fast-paced world"],"defaultModelClass":"smart-text","defaultKeywords":["dtc","ecommerce","growth"],"targetLanguages":["en","sv"],"publishIntegrationId":null,"defaultSystemPrompt":null,"defaultUserPromptTemplate":null,"defaultAiModel":null,"heroImageGatewayModel":null,"systemPromptOverrides":{},"extraVariables":{},"autoEnqueueFullDraftFromIdeas":false,"randomAssignAuthorFromActiveBrandAuthors":false,"structuredAssignCategoriesDuringIdeation":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/config' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putConfig","summary":"Put Config","description":"Public API endpoint: orgBlog.putConfig\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"voice":"Authoritative, friendly, no fluff.","tone":"Punchy in intros, factual in body.","targetAudience":"DTC ecommerce founders shipping consumer products in EU/US.","styleGuidelines":"Lead with a hook. Use short paragraphs. Cite primary sources.","bannedPhrases":["in conclusion","in today's fast-paced world"],"defaultModelClass":"smart-text","defaultKeywords":["dtc","ecommerce","growth"],"targetLanguages":["en","sv"],"publishIntegrationId":null,"defaultSystemPrompt":null,"defaultUserPromptTemplate":null,"defaultAiModel":null,"heroImageGatewayModel":null,"systemPromptOverrides":{},"extraVariables":{},"autoEnqueueFullDraftFromIdeas":false,"randomAssignAuthorFromActiveBrandAuthors":false,"structuredAssignCategoriesDuringIdeation":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"string","maxLength":2000,"nullable":true},"tone":{"type":"string","maxLength":2000,"nullable":true},"targetAudience":{"type":"string","maxLength":2000,"nullable":true},"styleGuidelines":{"type":"string","maxLength":8000,"nullable":true},"bannedPhrases":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":200},"defaultModelClass":{"type":"string","enum":["fast-text","smart-text","research"]},"defaultKeywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50},"targetLanguages":{"type":"array","items":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"maxItems":24},"publishIntegrationId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"defaultSystemPrompt":{"type":"string","maxLength":32000,"nullable":true},"defaultUserPromptTemplate":{"type":"string","maxLength":32000,"nullable":true},"defaultAiModel":{"type":"string","maxLength":200,"nullable":true},"heroImageGatewayModel":{"type":"string","maxLength":120,"nullable":true},"systemPromptOverrides":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":20000}},"extraVariables":{"type":"object","additionalProperties":{"type":"string","maxLength":2000}},"autoEnqueueFullDraftFromIdeas":{"type":"boolean"},"randomAssignAuthorFromActiveBrandAuthors":{"type":"boolean"},"structuredAssignCategoriesDuringIdeation":{"type":"boolean"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/config' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/config/brands/{brandId}":{"get":{"operationId":"getBrandConfig","summary":"Get Brand Config","description":"Public API endpoint: orgBlog.getBrandConfig\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"voice":"Authoritative, friendly, no fluff.","tone":"Punchy in intros, factual in body.","targetAudience":"DTC ecommerce founders shipping consumer products in EU/US.","styleGuidelines":"Lead with a hook. Use short paragraphs. Cite primary sources.","bannedPhrases":["in conclusion","in today's fast-paced world"],"defaultModelClass":"smart-text","defaultKeywords":["dtc","ecommerce","growth"],"targetLanguages":["en","sv"],"publishIntegrationId":null,"defaultSystemPrompt":null,"defaultUserPromptTemplate":null,"defaultAiModel":null,"heroImageGatewayModel":null,"systemPromptOverrides":{},"extraVariables":{},"autoEnqueueFullDraftFromIdeas":false,"randomAssignAuthorFromActiveBrandAuthors":false,"structuredAssignCategoriesDuringIdeation":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putBrandConfig","summary":"Put Brand Config","description":"Public API endpoint: orgBlog.putBrandConfig\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"voice":"Authoritative, friendly, no fluff.","tone":"Punchy in intros, factual in body.","targetAudience":"DTC ecommerce founders shipping consumer products in EU/US.","styleGuidelines":"Lead with a hook. Use short paragraphs. Cite primary sources.","bannedPhrases":["in conclusion","in today's fast-paced world"],"defaultModelClass":"smart-text","defaultKeywords":["dtc","ecommerce","growth"],"targetLanguages":["en","sv"],"publishIntegrationId":null,"defaultSystemPrompt":null,"defaultUserPromptTemplate":null,"defaultAiModel":null,"heroImageGatewayModel":null,"systemPromptOverrides":{},"extraVariables":{},"autoEnqueueFullDraftFromIdeas":false,"randomAssignAuthorFromActiveBrandAuthors":false,"structuredAssignCategoriesDuringIdeation":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"string","maxLength":2000,"nullable":true},"tone":{"type":"string","maxLength":2000,"nullable":true},"targetAudience":{"type":"string","maxLength":2000,"nullable":true},"styleGuidelines":{"type":"string","maxLength":8000,"nullable":true},"bannedPhrases":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":200},"defaultModelClass":{"type":"string","enum":["fast-text","smart-text","research"]},"defaultKeywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50},"targetLanguages":{"type":"array","items":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"maxItems":24},"publishIntegrationId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"defaultSystemPrompt":{"type":"string","maxLength":32000,"nullable":true},"defaultUserPromptTemplate":{"type":"string","maxLength":32000,"nullable":true},"defaultAiModel":{"type":"string","maxLength":200,"nullable":true},"heroImageGatewayModel":{"type":"string","maxLength":120,"nullable":true},"systemPromptOverrides":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":20000}},"extraVariables":{"type":"object","additionalProperties":{"type":"string","maxLength":2000}},"autoEnqueueFullDraftFromIdeas":{"type":"boolean"},"randomAssignAuthorFromActiveBrandAuthors":{"type":"boolean"},"structuredAssignCategoriesDuringIdeation":{"type":"boolean"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/blog/config/brands/{brandId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/authors":{"get":{"operationId":"listAuthors","summary":"List Authors","description":"Public API endpoint: orgBlog.listAuthors\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"501","orgId":"1","brandId":"10","displayName":"Jane Writer","slug":"jane-writer","bio":"Senior content lead.","avatarUrl":null,"wpAuthorIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postAuthor","summary":"Post Author","description":"Public API endpoint: orgBlog.postAuthor\n\n**Required scopes:** `org:blog:create`","tags":["Org"],"x-scopes":["org:blog:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"501","orgId":"1","brandId":"10","displayName":"Jane Writer","slug":"jane-writer","bio":"Senior content lead.","avatarUrl":null,"wpAuthorIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"displayName":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"bio":{"type":"string","maxLength":2000,"nullable":true},"avatarUrl":{"type":"string","format":"uri","nullable":true},"status":{"type":"string","enum":["active","archived"]}},"required":["displayName","slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/authors',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/categories":{"get":{"operationId":"listCategories","summary":"List Categories","description":"Public API endpoint: orgBlog.listCategories\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"601","orgId":"1","brandId":"10","name":"Marketing","slug":"marketing","description":"All marketing-related posts.","heroImageUrl":null,"heroImageAlt":null,"seoTitle":null,"seoDescription":null,"wpCategoryIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postCategory","summary":"Post Category","description":"Public API endpoint: orgBlog.postCategory\n\n**Required scopes:** `org:blog:create`","tags":["Org"],"x-scopes":["org:blog:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"601","orgId":"1","brandId":"10","name":"Marketing","slug":"marketing","description":"All marketing-related posts.","heroImageUrl":null,"heroImageAlt":null,"seoTitle":null,"seoDescription":null,"wpCategoryIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","status":"active"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","maxLength":2000,"nullable":true},"heroImageUrl":{"type":"string","maxLength":4096,"nullable":true},"heroImageAlt":{"type":"string","maxLength":500,"nullable":true},"seoTitle":{"type":"string","maxLength":255,"nullable":true},"seoDescription":{"type":"string","maxLength":500,"nullable":true},"status":{"type":"string","enum":["active","archived"]}},"required":["name","slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/categories',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts":{"get":{"operationId":"listPosts","summary":"List Posts","description":"Public API endpoint: orgBlog.listPosts\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","orgId","brandId","authorId","status","title","slug","excerpt","heroImageUrl","scheduledAt","publishedAt","baseLang","langs","categoryCount","tagCount","productCount","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","brandId","authorId","status","title","slug","excerpt","heroImageUrl","scheduledAt","publishedAt","baseLang","langs","categoryCount","tagCount","productCount","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","brandId","authorId","status","title","slug","excerpt","heroImageUrl","scheduledAt","publishedAt","baseLang","langs","categoryCount","tagCount","productCount","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["idea","draft","revision","approval","scheduled","published","archived"]}},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["idea","draft","revision","approval","scheduled","published","archived"]},"maxItems":10}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"801","orgId":"1","brandId":"10","authorId":"501","status":"draft","title":"How AI is reshaping ecommerce","slug":"how-ai-is-reshaping-ecommerce","excerpt":"A short tour of practical AI in ecommerce.","heroImageUrl":null,"scheduledAt":null,"publishedAt":null,"baseLang":"en","langs":["en"],"categoryCount":1,"tagCount":1,"productCount":1,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postPost","summary":"Post","description":"Public API endpoint: orgBlog.postPost\n\n**Required scopes:** `org:blog:create`","tags":["Org"],"x-scopes":["org:blog:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"801","orgId":"1","brandId":"10","authorId":"501","status":"draft","title":"How AI is reshaping ecommerce","slug":"how-ai-is-reshaping-ecommerce","excerpt":"A short tour of practical AI in ecommerce.","intro":null,"content":[],"keywords":["ai","ecommerce"],"heroImageUrl":null,"heroImageAlt":null,"heroImageMeta":null,"seoTitle":null,"seoDescription":null,"scheduledAt":null,"publishedAt":null,"baseLang":"en","createdByUserId":null,"aiRunId":null,"citationAllowlistKeys":null,"categoryIds":["601"],"tagIds":["701"],"productIds":["901"],"translations":[],"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"authorId":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":512},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"excerpt":{"type":"string","maxLength":2000,"nullable":true},"intro":{"type":"string","maxLength":4000,"nullable":true},"content":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"maxItems":8000,"default":[]},"keywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50,"default":[]},"heroImageUrl":{"type":"string","maxLength":4096,"nullable":true},"heroImageAlt":{"type":"string","maxLength":500,"nullable":true},"heroImageMeta":{"type":"object","additionalProperties":{},"nullable":true},"seoTitle":{"type":"string","maxLength":255,"nullable":true},"seoDescription":{"type":"string","maxLength":500,"nullable":true},"baseLang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"],"default":"en"},"status":{"type":"string","enum":["idea","draft","revision","approval","scheduled","published","archived"],"default":"draft"},"scheduledAt":{"type":"string","format":"date-time"},"categoryIds":{"type":"array","items":{"type":"string"},"default":[]},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"productIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":12,"default":[]},"revisionFeedback":{"type":"string","maxLength":8000,"nullable":true}},"required":["title","slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/tags":{"get":{"operationId":"listTags","summary":"List Tags","description":"Public API endpoint: orgBlog.listTags\n\n**Required scopes:** `org:blog:read`","tags":["Org"],"x-scopes":["org:blog:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"brandId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"701","orgId":"1","brandId":"10","name":"AI","slug":"ai","wpTagIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postTag","summary":"Post Tag","description":"Public API endpoint: orgBlog.postTag\n\n**Required scopes:** `org:blog:create`","tags":["Org"],"x-scopes":["org:blog:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"701","orgId":"1","brandId":"10","name":"AI","slug":"ai","wpTagIdPerSite":{},"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"required":["name","slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/tags',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts/{blogPostId}/translations":{"patch":{"operationId":"patchPostTranslation","summary":"Patch Post Translation","description":"Public API endpoint: orgBlog.patchPostTranslation\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"t1","postId":"801","lang":"sv","title":"Hur AI formar e-handel","slug":"hur-ai-formar-e-handel","intro":null,"excerpt":null,"keywords":[],"taxonomyLabels":null,"content":[],"heroImageAlt":null,"seoTitle":null,"seoDescription":null,"status":"ready","generatedAt":null,"aiRunId":null,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"title":{"type":"string","minLength":1,"maxLength":512},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"intro":{"type":"string","maxLength":4000,"nullable":true},"excerpt":{"type":"string","maxLength":2000,"nullable":true},"keywords":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":50},"taxonomyLabels":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["id","name"],"additionalProperties":false},"maxItems":100,"default":[]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["id","name"],"additionalProperties":false},"maxItems":100,"default":[]}},"additionalProperties":false,"nullable":true},"content":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"maxItems":8000,"default":[]},"heroImageAlt":{"type":"string","maxLength":500,"nullable":true},"seoTitle":{"type":"string","maxLength":255,"nullable":true},"seoDescription":{"type":"string","maxLength":500,"nullable":true},"takeOverFromAi":{"type":"boolean"}},"required":["lang"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translations' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translations', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translations',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/ideas":{"post":{"operationId":"postIdeas","summary":"Post Ideas","description":"Public API endpoint: orgBlog.postIdeas\n\n**Required scopes:** `org:blog:create`","tags":["Org"],"x-scopes":["org:blog:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"801","orgId":"1","brandId":"10","authorId":"501","status":"draft","title":"How AI is reshaping ecommerce","slug":"how-ai-is-reshaping-ecommerce","excerpt":"A short tour of practical AI in ecommerce.","heroImageUrl":null,"scheduledAt":null,"publishedAt":null,"baseLang":"en","langs":["en"],"categoryCount":1,"tagCount":1,"productCount":1,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"count":{"type":"integer","minimum":1,"maximum":20,"default":10},"instructions":{"type":"string","maxLength":2000}},"required":["brandId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/ideas' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/ideas', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/ideas',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts/{blogPostId}/publish/wordpress":{"post":{"operationId":"publishPostToWordPress","summary":"Publish Post To Word Press","description":"Public API endpoint: orgBlog.publishPostToWordPress\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"postId":"801","brandId":"10","wpIntegrationId":"wp-int-1","wpPostId":42},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"wpIntegrationId":{"type":"string"},"wpStatus":{"type":"string","enum":["draft","publish"]},"includeTranslations":{"type":"boolean","default":false}},"required":["brandId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/publish/wordpress' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/publish/wordpress', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/publish/wordpress',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/blog/posts/{blogPostId}/translate":{"post":{"operationId":"translatePost","summary":"Translate Post","description":"Public API endpoint: orgBlog.translatePost\n\n**Required scopes:** `org:blog:write`","tags":["Org"],"x-scopes":["org:blog:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"blogPostId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"langs":{"type":"array","items":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"maxItems":20},"force":{"type":"boolean","default":false}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translate' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translate', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/blog/posts/{blogPostId}/translate',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/storage/presigned-url":{"get":{"operationId":"getPresignedUrl","summary":"Get Presigned Url","description":"Public API endpoint: storage.getPresignedUrl","tags":["Storage"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"fileName","in":"query","required":false,"schema":{"type":"string"}},{"name":"contentType","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["put"]}},{"name":"storageGroup","in":"query","required":false,"schema":{"type":"string","enum":["users","brands","orgs"]}},{"name":"groupId","in":"query","required":false,"schema":{"type":"string"}},{"name":"fixedKey","in":"query","required":false,"schema":{"type":"string"}},{"name":"pathPrefix","in":"query","required":false,"schema":{"type":"string","maxLength":512}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"url":"https://storage.example.com/presigned?key=user/1/profile.png","key":"user/1/profile.png"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/storage/presigned-url' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/storage/presigned-url', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/storage/presigned-url',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/storage/ecom-collection-image-register":{"post":{"operationId":"registerEcomCollectionImage","summary":"Register Ecom Collection Image","description":"Public API endpoint: storage.registerEcomCollectionImage","tags":["Storage"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"fileUploadId":"fu_example","publicCdnUrl":"https://cdn.example.com/assets/orgs/org/ecom-collections/coll/hero.jpg"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"collectionId":{"type":"string"},"storageKey":{"type":"string","minLength":1,"maxLength":2048},"filename":{"type":"string","minLength":1,"maxLength":512},"contentType":{"type":"string","minLength":1,"maxLength":128},"sizeBytes":{"type":"integer","minimum":0}},"required":["orgId","collectionId","storageKey","filename","contentType","sizeBytes"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/storage/ecom-collection-image-register' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/storage/ecom-collection-image-register', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/storage/ecom-collection-image-register',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/storage/ecom-product-image-register":{"post":{"operationId":"registerEcomProductImage","summary":"Register Ecom Product Image","description":"Public API endpoint: storage.registerEcomProductImage","tags":["Storage"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"fileUploadId":"fu_example","publicCdnUrl":"https://cdn.example.com/assets/orgs/org/ecom-products/prod/hero.jpg"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"string"},"productId":{"type":"string"},"storageKey":{"type":"string","minLength":1,"maxLength":2048},"filename":{"type":"string","minLength":1,"maxLength":512},"contentType":{"type":"string","minLength":1,"maxLength":128},"sizeBytes":{"type":"integer","minimum":0}},"required":["orgId","productId","storageKey","filename","contentType","sizeBytes"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/storage/ecom-product-image-register' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/storage/ecom-product-image-register', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/storage/ecom-product-image-register',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/storage/public-asset":{"post":{"operationId":"uploadPublicAsset","summary":"Upload Public Asset","description":"Public API endpoint: storage.uploadPublicAsset","tags":["Storage"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"url":"https://cdn.example.com/uploads/user/1/profile.png","key":"user/1/profile.png"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{},"storageGroup":{"type":"string","enum":["users","brands","orgs"]},"groupId":{"type":"string"},"fixedKey":{"type":"string"},"pathPrefix":{"type":"string","maxLength":512}},"required":["file","storageGroup","groupId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/storage/public-asset' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/storage/public-asset', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/storage/public-asset',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}":{"get":{"operationId":"getById","summary":"Get By Id","description":"Get brand by id\n\n**Required scopes:** `brand:read`","tags":["Brand"],"x-scopes":["brand:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"10","name":"Acme Brand","description":"Consumer brand for Acme","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","org":{"id":"1","name":"Acme Org"},"createdBy":{"id":"100","name":"Jane Doe"}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putById","summary":"Put By Id","description":"Public API endpoint: brand.putById\n\n**Required scopes:** `brand:write`","tags":["Brand"],"x-scopes":["brand:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"10","name":"Acme Brand","description":"Consumer brand for Acme","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","org":{"id":"1","name":"Acme Org"},"createdBy":{"id":"100","name":"Jane Doe"}},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":255}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/profile":{"get":{"operationId":"getById","summary":"Get By Id","description":"Public API endpoint: brandProfile.getById\n\n**Required scopes:** `brand:settings:read`","tags":["Brand Profile"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","seoDescription":"A great brand for modern commerce.","footerText":"© 2025 Acme Inc. All rights reserved.","favicon":"https://example.com/favicon.ico","logoLight":"https://example.com/logo-light.png","logoDark":"https://example.com/logo-dark.png","supportEmail":"support@example.com","supportPhone":"+1234567890","facebookUrl":"https://example.com/facebook","instagramUrl":"https://example.com/instagram","youtubeUrl":"https://example.com/youtube","primaryStoreId":"1","primaryWebshopDomainId":null,"storefrontHomeFeaturedProductId":null,"storefrontHomeBuyPackProductIds":null,"storefrontPrimaryColor":null,"storefrontGoogleFont":null,"storefrontProductReviewPolicy":null,"storefrontCheckoutChromeMode":"default"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/profile' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/profile', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/profile',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putById","summary":"Put By Id","description":"Public API endpoint: brandProfile.putById\n\n**Required scopes:** `brand:settings:write`","tags":["Brand Profile"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"1","seoDescription":"A great brand for modern commerce.","footerText":"© 2025 Acme Inc. All rights reserved.","favicon":"https://example.com/favicon.ico","logoLight":"https://example.com/logo-light.png","logoDark":"https://example.com/logo-dark.png","supportEmail":"support@example.com","supportPhone":"+1234567890","facebookUrl":"https://example.com/facebook","instagramUrl":"https://example.com/instagram","youtubeUrl":"https://example.com/youtube","primaryStoreId":"1","primaryWebshopDomainId":null,"storefrontHomeFeaturedProductId":null,"storefrontHomeBuyPackProductIds":null,"storefrontPrimaryColor":null,"storefrontGoogleFont":null,"storefrontProductReviewPolicy":null,"storefrontCheckoutChromeMode":"default"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primaryStoreId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"string","enum":[""]}]},"primaryWebshopDomainId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"string","enum":[""]}],"nullable":true},"seoDescription":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"string","enum":[""]}]},"footerText":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"string","enum":[""]}]},"favicon":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"logoLight":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"logoDark":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"supportEmail":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"email"}]},{"type":"string","enum":[""]}]},"supportPhone":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","maxLength":255}]},{"type":"string","enum":[""]}]},"facebookUrl":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"instagramUrl":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"youtubeUrl":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string","format":"uri"}]},{"type":"string","enum":[""]}]},"storefrontHomeFeaturedProductId":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"string","enum":[""]}],"nullable":true},"storefrontHomeBuyPackProductIds":{"type":"array","items":{"type":"string"},"minItems":3,"maxItems":3,"nullable":true},"storefrontPrimaryColor":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"string","enum":[""]},{"enum":["null"],"nullable":true}]},"storefrontGoogleFont":{"anyOf":[{"type":"string","enum":["instrument_sans","inter","dm_sans","plus_jakarta_sans","outfit","manrope"]},{"type":"string","enum":[""]},{"enum":["null"],"nullable":true}]},"storefrontProductReviewPolicy":{"type":"object","properties":{"enabled":{"type":"boolean"},"moderationMode":{"type":"string","enum":["threshold","all_pending"]},"autoPublishMinRating":{"type":"integer","minimum":1,"maximum":5}},"required":["enabled","moderationMode","autoPublishMinRating"],"additionalProperties":false,"nullable":true},"storefrontCheckoutChromeMode":{"type":"string","enum":["default","intercept_minimal"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/profile' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/profile', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/profile',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom":{"get":{"operationId":"getForBrand","summary":"Get","description":"Public API endpoint: ecomSettings.getForBrand\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Settings"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putForBrand","summary":"Put","description":"Public API endpoint: ecomSettings.putForBrand\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Settings"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"b123","orgId":"o456","activeLangs":["en"],"primaryLang":"en","langOverrideActive":false,"blogTargetLangsMirrorStorefront":false,"checkoutProvider":"shopify_hosted","defaultStripeIntegrationId":null,"defaultAirwallexIntegrationId":null,"currencyOverrideActive":false,"mainCurrency":"USD","discountStackingPolicy":"single_best","cognisDiscountEngineEnabled":false,"allowStripeNativePromotionCodes":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"langOverrideActive":{"type":"boolean"},"activeLangs":{"type":"array","items":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"minItems":1},"primaryLang":{"type":"string","enum":["en","sv","no","da","fi","de","it","nl","pl","pt","es","fr"]},"blogTargetLangsMirrorStorefront":{"type":"boolean"},"checkoutProvider":{"anyOf":[{"type":"string","enum":["shopify_hosted","stripe_hosted","airwallex_hosted"]},{"enum":["null"],"nullable":true}]},"defaultStripeIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"defaultAirwallexIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"currencyOverrideActive":{"type":"boolean"},"mainCurrency":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","SEK","NOK","DKK","CHF","PLN","CZK"]},"enabledStorefrontCurrencies":{"type":"array","items":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","SEK","NOK","DKK","CHF","PLN","CZK"]},"minItems":1},"abandonedCheckoutConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"delayMinutes":{"type":"integer","minimum":5,"maximum":43200},"enabled":{"type":"boolean"}},"required":["delayMinutes","enabled"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["enabled","steps"],"additionalProperties":false,"nullable":true},"klaviyoCheckoutEventsConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"klaviyoIntegrationId":{"anyOf":[{"type":"string"},{"enum":["null"],"nullable":true}]},"suppressCognisAbandonedEmails":{"type":"boolean"}},"required":["enabled","klaviyoIntegrationId"],"additionalProperties":false,"nullable":true},"orderNumberPrefix":{"type":"string","maxLength":12},"orderNumberSeparator":{"type":"string","maxLength":1},"orderNumberPadding":{"type":"integer","minimum":0,"maximum":8},"orderNumberStartingMinimum":{"type":"integer","minimum":1},"discountStackingPolicy":{"anyOf":[{"type":"string","enum":["single_best","stackable","exclusive_codes"]},{"enum":["null"],"nullable":true}]},"cognisDiscountEngineEnabled":{"type":"boolean","nullable":true},"allowStripeNativePromotionCodes":{"type":"boolean","nullable":true},"wishlistEnabled":{"type":"boolean","nullable":true},"wishlistMaxItems":{"type":"integer","minimum":1,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/cancel":{"post":{"operationId":"cancel","summary":"Cancel","description":"Cancel a Cognis OLTP order for a brand (paired cancel metadata).\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/cancel' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/cancel', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/cancel',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/refunds":{"post":{"operationId":"createRefund","summary":"Create Refund","description":"Admin-initiated Stripe refund for a Cognis OLTP order. Ledger row is optimistic; cumulative totals sync via `charge.refunded` webhook.\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true,"stripeRefundId":"re_example","amountMinor":1999,"currency":"USD","status":"succeeded","ledgerRefundId":"ref_example"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountMinor":{"type":"integer","exclusiveMinimum":true,"minimum":0},"reason":{"type":"string","minLength":1,"maxLength":500},"restock":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128},"lineItems":{"type":"array","items":{"type":"object","properties":{"orderItemId":{"type":"string","minLength":1},"quantity":{"type":"integer","exclusiveMinimum":true,"minimum":0},"restock":{"type":"boolean"}},"required":["orderItemId","quantity"],"additionalProperties":false},"minItems":1}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/refunds' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/refunds', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/refunds',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/shipments":{"post":{"operationId":"createShipment","summary":"Create Shipment","description":"Record a Cognis-native shipment (tracking number + carrier) and bump order fulfillment_status.\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true,"shipmentId":"shp_example"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1},"carrier":{"type":"string","minLength":1,"nullable":true},"trackingUrl":{"type":"string","nullable":true},"lineItems":{"type":"array","items":{"type":"object","properties":{"orderItemId":{"type":"string","minLength":1},"quantityToFulfill":{"type":"integer","exclusiveMinimum":true,"minimum":0}},"required":["orderItemId","quantityToFulfill"],"additionalProperties":false}}},"required":["trackingNumber"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/decision":{"post":{"operationId":"decideReturn","summary":"Decide Return","description":"Approve or reject a buyer return request (`commerce_returns.status` from `requested` only).\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"returnId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true,"returnId":"ret_example","status":"approved"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"adminNotes":{"type":"string","maxLength":2000,"nullable":true}},"required":["decision"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/decision' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/decision', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/decision',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/invoice-pdf-download-url":{"get":{"operationId":"getInvoicePdfDownloadUrl","summary":"Get Invoice Pdf Download Url","description":"Ensure commerce order invoice PDF exists and return a short-lived signed download URL.\n\n**Required scopes:** `brand:products:read`","tags":["Commerce Orders"],"x-scopes":["brand:products:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"downloadUrl":"https://storage.example/signed"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/invoice-pdf-download-url' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/invoice-pdf-download-url', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/invoice-pdf-download-url',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders":{"get":{"operationId":"list","summary":"List","description":"List Cognis OLTP storefront orders for one brand.\n\n**Required scopes:** `brand:products:read`","tags":["Commerce Orders"],"x-scopes":["brand:products:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"placedAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["placedAt","orderNumber","brandName","financialStatus","internalStatus","totalMinor"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"placedAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","brandId","brandName","orderNumber","orderSequence","source","financialStatus","fulfillmentStatus","internalStatus","internalStatusNote","cancelledAt","cancelReason","cancelledByUserId","requiresInventoryReview","inventoryReviewReason","email","currency","subtotalMinor","taxMinor","shippingMinor","discountMinor","totalMinor","amountRefundedMinor","stripeCheckoutSessionId","stripePaymentIntentId","stripeIntegrationId","livemode","placedAt","processedAt","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","brandId","brandName","orderNumber","orderSequence","source","financialStatus","fulfillmentStatus","internalStatus","internalStatusNote","cancelledAt","cancelReason","cancelledByUserId","requiresInventoryReview","inventoryReviewReason","email","currency","subtotalMinor","taxMinor","shippingMinor","discountMinor","totalMinor","amountRefundedMinor","stripeCheckoutSessionId","stripePaymentIntentId","stripeIntegrationId","livemode","placedAt","processedAt","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}},{"name":"commerceProductId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"financialStatus","in":"query","required":false,"schema":{"type":"string","enum":["pending","paid","partially_refunded","refunded","voided","failed"]}},{"name":"internalStatus","in":"query","required":false,"schema":{"type":"string","enum":["open","requires_review","on_hold","closed","cancelled"]}},{"name":"requiresInventoryReview","in":"query","required":false,"schema":{"type":"string","enum":["1","true"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/shipments/{shipmentId}/delivered":{"post":{"operationId":"markShipmentDelivered","summary":"Mark Shipment Delivered","description":"Mark a commerce_shipments row delivered; auto-closes internal_status from open when all parcels are delivered (default-on).\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shipmentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true,"internalStatusAutoClosed":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments/{shipmentId}/delivered' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments/{shipmentId}/delivered', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/shipments/{shipmentId}/delivered',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/received":{"post":{"operationId":"markReturnReceived","summary":"Mark Return Received","description":"Mark an approved return as received, restock returned catalog variants, and issue a line-sum Stripe refund linked on the return row.\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"returnId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true,"returnId":"ret_example","status":"refunded","restockOutcome":"restocked","refundIssued":true,"ledgerRefundId":"ref_example"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"issueRefund":{"type":"boolean"},"refundReason":{"type":"string","maxLength":500},"adminNotes":{"type":"string","maxLength":2000,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/received' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/received', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/returns/{returnId}/received',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/commerce/orders/{orderId}/internal-status":{"patch":{"operationId":"patchInternalStatus","summary":"Patch Internal Status","description":"Patch merchant `internal_status` on a Cognis OLTP order (brand scoped).\n\n**Required scopes:** `brand:products:write`","tags":["Commerce Orders"],"x-scopes":["brand:products:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"internalStatus":{"type":"string","enum":["open","requires_review","on_hold","closed"]},"internalStatusNote":{"type":"string","nullable":true}},"required":["internalStatus"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/internal-status' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/internal-status', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/brands/{brandId}/commerce/orders/{orderId}/internal-status',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/commerce-currencies":{"get":{"operationId":"listBrandCurrencies","summary":"List Brand Currencies","description":"List Cognis OLTP storefront currencies for a brand (`commerce_brand_currencies`).\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Catalog"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putBrandCurrencies","summary":"Put Brand Currencies","description":"Replace enabled/default flags for brand storefront currencies (`commerce_brand_currencies`).\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Catalog"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","SEK","NOK","DKK","CHF","PLN","CZK"]},"enabled":{"type":"boolean"},"isDefault":{"type":"boolean"},"position":{"type":"integer","minimum":0}},"required":["currency","enabled","isDefault"],"additionalProperties":false},"minItems":1}},"required":["currencies"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/commerce-currencies',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/discount-rules":{"post":{"operationId":"create","summary":"Create","description":"Create a Cognis-native discount rule for a brand.\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Discounts"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["percent_off","fixed_amount_off","free_shipping"]},"enabled":{"type":"boolean"},"percentOff":{"type":"number","minimum":0,"maximum":100,"nullable":true},"amountOffMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3,"nullable":true},"minSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"scopeJsonb":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"variantIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"collectionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200}},"additionalProperties":false},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"enum":["null"],"nullable":true}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"enum":["null"],"nullable":true}]},"maxRedemptionsGlobal":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"maxRedemptionsPerCustomer":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"code":{"type":"string","minLength":1,"maxLength":64}},"required":["type","code"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]},"get":{"operationId":"list","summary":"List","description":"List Cognis-native discount rules for a brand (`commerce_discount_rules`).\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Discounts"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/discount-rules/usage-analytics":{"get":{"operationId":"getUsageAnalytics","summary":"Get Usage Analytics","description":"Windowed redemption analytics from `commerce_discount_redemptions` joined to rules and orders (not Stripe Promotion Code API).\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Discounts"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"windowDays","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":365,"default":30}},{"name":"recentLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"ruleId","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"windowDays":30,"totals":{"redemptionCount":12,"discountAmountMinor":48500,"distinctOrderCount":11},"byRule":[{"ruleId":"rule_abc","code":"SAVE10","type":"percent_off","enabled":true,"redemptionCount":8,"discountAmountMinor":32000,"distinctOrderCount":8}],"recentRedemptions":[{"redemptionId":"red_abc","ruleId":"rule_abc","code":"SAVE10","orderId":"ord_abc","orderNumber":"1001","amountMinor":4000,"currency":"usd","createdAt":"2026-06-01T12:00:00.000Z"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/usage-analytics' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/usage-analytics', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/usage-analytics',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/discount-rules/{ruleId}":{"put":{"operationId":"update","summary":"Update","description":"Update or disable a Cognis-native discount rule (`enabled: false`). Codes are immutable.\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Discounts"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"percentOff":{"type":"number","minimum":0,"maximum":100,"nullable":true},"amountOffMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3,"nullable":true},"minSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"scopeJsonb":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"variantIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"collectionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200}},"additionalProperties":false},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"enum":["null"],"nullable":true}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"enum":["null"],"nullable":true}]},"maxRedemptionsGlobal":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"maxRedemptionsPerCustomer":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/{ruleId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/{ruleId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/discount-rules/{ruleId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates":{"post":{"operationId":"createRate","summary":"Create Rate","description":"Create a flat or free shipping rate on a Cognis zone.\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"zoneId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"displayName":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["flat","free"]},"amountMinor":{"type":"integer","minimum":0,"maximum":999999999},"currency":{"type":"string","minLength":3,"maxLength":3},"minSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"maxSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"enabled":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":-1000,"maximum":1000},"estimatedMinDays":{"type":"integer","minimum":0,"maximum":365,"nullable":true},"estimatedMaxDays":{"type":"integer","minimum":0,"maximum":365,"nullable":true}},"required":["name","displayName","type","currency"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/shipping-zones":{"post":{"operationId":"createZone","summary":"Create Zone","description":"Create a Cognis shipping zone with optional country allowlist.\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"},"priority":{"type":"integer","minimum":-1000,"maximum":1000},"matchType":{"type":"string","enum":["countries","default"]},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2},"maxItems":250}},"required":["name","matchType"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]},"get":{"operationId":"listZones","summary":"List Zones","description":"List Cognis shipping zones and nested rates for a brand (`commerce_shipping_*`).\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}":{"delete":{"operationId":"deleteRate","summary":"Delete Rate","description":"Delete a Cognis shipping rate from a zone.\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"zoneId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"deleted":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"updateRate","summary":"Update Rate","description":"Update a Cognis shipping rate (internal name is immutable).\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"zoneId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["flat","free"]},"amountMinor":{"type":"integer","minimum":0,"maximum":999999999},"currency":{"type":"string","minLength":3,"maxLength":3},"minSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"maxSubtotalMinor":{"type":"integer","minimum":0,"maximum":999999999,"nullable":true},"enabled":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":-1000,"maximum":1000},"estimatedMinDays":{"type":"integer","minimum":0,"maximum":365,"nullable":true},"estimatedMaxDays":{"type":"integer","minimum":0,"maximum":365,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}/rates/{rateId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/shipping-zones/{zoneId}":{"delete":{"operationId":"deleteZone","summary":"Delete Zone","description":"Delete a non-default Cognis shipping zone (cascades rates).\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"zoneId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"deleted":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"updateZone","summary":"Update Zone","description":"Update a Cognis shipping zone (name, priority, countries, enabled).\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Shipping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"zoneId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"},"priority":{"type":"integer","minimum":-1000,"maximum":1000},"matchType":{"type":"string","enum":["countries","default"]},"countryCodes":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2},"maxItems":250}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/shipping-zones/{zoneId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/analytics-settings":{"get":{"operationId":"getSettings","summary":"Get Settings","description":"Public API endpoint: ecomAnalytics.getSettings\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Analytics"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgGoogleAnalyticsIntegrationId":null,"ga4PropertyId":null,"ga4WebStreamId":null,"ga4MeasurementId":"G-ABCDEFGH","provisioningSource":"manual","tagEnabled":true,"gtmContainerId":null,"tagStatus":"pending","orgGa4Connected":true,"hasVerifiedPrimaryDomain":false,"metaPixelId":null,"metaPixelEnabled":false,"hasMetaCapiToken":false,"tripleWhaleEnabled":false,"tripleWhaleHeadScript":null,"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putSettings","summary":"Put Settings","description":"Public API endpoint: ecomAnalytics.putSettings\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Analytics"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgGoogleAnalyticsIntegrationId":null,"ga4PropertyId":null,"ga4WebStreamId":null,"ga4MeasurementId":"G-ABCDEFGH","provisioningSource":"manual","tagEnabled":true,"gtmContainerId":null,"tagStatus":"pending","orgGa4Connected":true,"hasVerifiedPrimaryDomain":false,"metaPixelId":null,"metaPixelEnabled":false,"hasMetaCapiToken":false,"tripleWhaleEnabled":false,"tripleWhaleHeadScript":null,"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tagEnabled":{"type":"boolean"},"ga4MeasurementId":{"type":"string","pattern":"^G-[A-Z0-9]+$","nullable":true},"gtmContainerId":{"type":"string","maxLength":32,"nullable":true},"metaPixelId":{"type":"string","pattern":"^\\d{5,20}$","nullable":true},"metaPixelEnabled":{"type":"boolean"},"metaCapiAccessToken":{"type":"string","maxLength":512},"tripleWhaleEnabled":{"type":"boolean"},"tripleWhaleHeadScript":{"type":"string","maxLength":8192,"nullable":true}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/analytics-settings/link":{"post":{"operationId":"linkGa4","summary":"Link Ga4","description":"Public API endpoint: ecomAnalytics.linkGa4\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Analytics"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgGoogleAnalyticsIntegrationId":null,"ga4PropertyId":null,"ga4WebStreamId":null,"ga4MeasurementId":"G-ABCDEFGH","provisioningSource":"manual","tagEnabled":true,"gtmContainerId":null,"tagStatus":"pending","orgGa4Connected":true,"hasVerifiedPrimaryDomain":false,"metaPixelId":null,"metaPixelEnabled":false,"hasMetaCapiToken":false,"tripleWhaleEnabled":false,"tripleWhaleHeadScript":null,"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ga4PropertyId":{"type":"string","minLength":1,"maxLength":64}},"required":["ga4PropertyId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/link' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/link', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/link',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/analytics-settings/provision":{"post":{"operationId":"provisionGa4","summary":"Provision Ga4","description":"Public API endpoint: ecomAnalytics.provisionGa4\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Analytics"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgGoogleAnalyticsIntegrationId":null,"ga4PropertyId":null,"ga4WebStreamId":null,"ga4MeasurementId":"G-ABCDEFGH","provisioningSource":"manual","tagEnabled":true,"gtmContainerId":null,"tagStatus":"pending","orgGa4Connected":true,"hasVerifiedPrimaryDomain":false,"metaPixelId":null,"metaPixelEnabled":false,"hasMetaCapiToken":false,"tripleWhaleEnabled":false,"tripleWhaleHeadScript":null,"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/provision' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/provision', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/analytics-settings/provision',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/organic-status":{"get":{"operationId":"getOrganicStatus","summary":"Get Organic Status","description":"Public API endpoint: ecomGoogleShopping.getOrganicStatus\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Google Shopping"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"2","orgId":"1","completeCount":3,"totalCount":6,"ready":false,"checkedAt":"2026-06-23T12:00:00.000Z","checks":[{"id":"gsc_connect","status":"complete","labelKey":"ecom.automation.organicLaunch.steps.gscConnect.label"},{"id":"gsc_verify","status":"incomplete","labelKey":"ecom.automation.organicLaunch.steps.gscVerify.label","detailKey":"ecom.brand.organicStatus.checks.gscVerify.incomplete"},{"id":"gsc_sitemap","status":"not_applicable","labelKey":"ecom.automation.organicLaunch.steps.gscSitemap.label"},{"id":"brand_trust_assets","status":"warning","labelKey":"ecom.brand.organicStatus.checks.brandTrustAssets.label"},{"id":"gmc_sub_account","status":"incomplete","labelKey":"ecom.brand.organicStatus.checks.gmcSubAccount.label"},{"id":"ga4_tag","status":"warning","labelKey":"ecom.brand.organicStatus.checks.ga4Tag.label","detailKey":"ecom.brand.organicStatus.checks.ga4Tag.pending"},{"id":"collection_seo","status":"incomplete","labelKey":"ecom.brand.organicStatus.checks.collectionSeo.label"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/organic-status' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/organic-status', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/organic-status',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/google-shopping-settings":{"get":{"operationId":"getSettings","summary":"Get Settings","description":"Public API endpoint: ecomGoogleShopping.getSettings\n\n**Required scopes:** `brand:settings:read`","tags":["Commerce Google Shopping"],"x-scopes":["brand:settings:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgMerchantCenterIntegrationId":"3","gmcSubAccountId":"987654321","dataSourceId":null,"syncStatus":"pending","orgGmcConnected":true,"orgMcaAccountId":"123456789","orgMcaAccountType":"advanced","orgGcpRegistered":true,"freeListingsStatus":"enabled","shoppingAdsProgramState":"eligible","productRatingsProgramState":"unknown","ga4LinkedToGmc":false,"ga4LinkPending":false,"ga4PropertyId":null,"storeRatingsOptInEnabled":false,"markets":[{"feedLabel":"US","currencyCode":"USD","contentLanguage":"en","source":"main","dataSourceId":null,"hasDataSource":false,"shippingAttached":false,"skipReason":"missing_data_source"}],"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/google-shopping-settings/provision":{"post":{"operationId":"provisionGmc","summary":"Provision Gmc","description":"Public API endpoint: ecomGoogleShopping.provisionGmc\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Google Shopping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgMerchantCenterIntegrationId":"3","gmcSubAccountId":"987654321","dataSourceId":null,"syncStatus":"pending","orgGmcConnected":true,"orgMcaAccountId":"123456789","orgMcaAccountType":"advanced","orgGcpRegistered":true,"freeListingsStatus":"enabled","shoppingAdsProgramState":"eligible","productRatingsProgramState":"unknown","ga4LinkedToGmc":false,"ga4LinkPending":false,"ga4PropertyId":null,"storeRatingsOptInEnabled":false,"markets":[{"feedLabel":"US","currencyCode":"USD","contentLanguage":"en","source":"main","dataSourceId":null,"hasDataSource":false,"shippingAttached":false,"skipReason":"missing_data_source"}],"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/provision' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/provision', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/provision',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/design-proposals/{designProposalId}":{"get":{"operationId":"getDesignProposalById","summary":"Get Design Proposal By Id","description":"Get a single design proposal by id, including liveUrl/liveUrls for the published custom-domain preview when available\n\n**Required scopes:** `brand:urls:read`","tags":["Design Proposals"],"x-scopes":["brand:urls:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"dprop_1","orgId":"org_1","brandId":"br_1","displayName":"Acme homepage proposal","websiteName":"Acme","websiteUrl":"https://acme.example.com","brief":"Acme makes premium dog food for active urban breeds.","imageAssetIds":[],"inspirationImageAssetIds":[],"companyImageAssetIds":[],"creationSource":"ai","status":"ready","latestAiRunId":"air_1","currentHtml":"<!doctype html>...","currentHtmlRunId":"air_1","publishedVariantVersionId":null,"previewPublishMode":"off","previewPublicSlug":"aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899","previewPasswordUpdatedAt":null,"createdBy":null,"createdAt":"2026-08-19T08:40:32.625Z","updatedAt":"2026-08-19T08:40:32.625Z","liveUrls":["https://preview.example.com/dprop_1/aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"],"liveUrl":"https://preview.example.com/dprop_1/aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"patch":{"operationId":"patchDesignProposalById","summary":"Patch Design Proposal By Id","description":"Update a design proposal (including currentHtml and preview publish settings). Response includes liveUrl/liveUrls for the published custom-domain preview when available.\n\n**Required scopes:** `brand:urls:write`","tags":["Design Proposals"],"x-scopes":["brand:urls:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":255},"websiteName":{"type":"string","minLength":1,"maxLength":255},"websiteUrl":{"type":"string","format":"uri","maxLength":2048},"brief":{"type":"string","minLength":50,"maxLength":2000},"imageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"inspirationImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"companyImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"status":{"type":"string","enum":["draft","generating","ready","failed","archived"]},"previewPublishMode":{"type":"string","enum":["off","public","password"]},"previewPublicSlug":{"type":"string","minLength":1,"maxLength":180,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"publishedVariantVersionId":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{1,26}$"},{"type":"string","format":"uuid"}]},{"enum":["null"],"nullable":true}]},"previewPassword":{"type":"string","minLength":8,"maxLength":200},"clearPreviewPassword":{"type":"boolean"},"currentHtml":{"type":"string"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PATCH 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}', {\n  method: 'PATCH',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.patch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/design-proposals":{"get":{"operationId":"listDesignProposalsForBrand","summary":"List Design Proposals","description":"List design proposals for a brand\n\n**Required scopes:** `brand:urls:read`","tags":["Design Proposals"],"x-scopes":["brand:urls:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["createdAt","updatedAt","displayName","websiteName","status"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","brandId","displayName","websiteName","websiteUrl","brief","imageAssetIds","inspirationImageAssetIds","companyImageAssetIds","creationSource","status","latestAiRunId","currentHtml","currentHtmlRunId","publishedVariantVersionId","previewPublishMode","previewPublicSlug","previewPasswordUpdatedAt","createdBy","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","brandId","displayName","websiteName","websiteUrl","brief","imageAssetIds","inspirationImageAssetIds","companyImageAssetIds","creationSource","status","latestAiRunId","currentHtml","currentHtmlRunId","publishedVariantVersionId","previewPublishMode","previewPublicSlug","previewPasswordUpdatedAt","createdBy","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"dprop_1","orgId":"org_1","brandId":"br_1","displayName":"Acme homepage proposal","websiteName":"Acme","websiteUrl":"https://acme.example.com","brief":"Acme makes premium dog food for active urban breeds.","imageAssetIds":[],"inspirationImageAssetIds":[],"companyImageAssetIds":[],"creationSource":"ai","status":"ready","latestAiRunId":"air_1","currentHtml":"<!doctype html>...","currentHtmlRunId":"air_1","publishedVariantVersionId":null,"previewPublishMode":"off","previewPublicSlug":"aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899","previewPasswordUpdatedAt":null,"createdBy":null,"createdAt":"2026-08-19T08:40:32.625Z","updatedAt":"2026-08-19T08:40:32.625Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postDesignProposalForBrand","summary":"Post Design Proposal","description":"Create a design proposal (AI run, empty manual HTML shell, or manual HTML with currentHtml + live URLs)\n\n**Required scopes:** `brand:urls:write`","tags":["Design Proposals"],"x-scopes":["brand:urls:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creationSource":{"type":"string","enum":["ai","manual_html"],"default":"ai"},"displayName":{"type":"string","minLength":1,"maxLength":255},"websiteName":{"type":"string","minLength":1,"maxLength":255},"websiteUrl":{"type":"string","maxLength":2048,"default":""},"brief":{"type":"string","maxLength":2000,"default":""},"imageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[]},"inspirationImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[]},"companyImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[]},"runMode":{"type":"string","enum":["immediate","stopAfterSiteContext"],"default":"immediate"},"lightAiModel":{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"],"default":"anthropic/claude-sonnet-4.6"},"aiModel":{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"],"default":"anthropic/claude-opus-4.7"},"currentHtml":{"type":"string"},"previewPublishMode":{"type":"string","enum":["off","public","password"]}},"required":["displayName","websiteName"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/design-proposals/{designProposalId}/variants":{"get":{"operationId":"listDesignProposalVariantsForProposal","summary":"List Design Proposal Variants For Proposal","description":"List variants (lanes) for a design proposal\n\n**Required scopes:** `brand:urls:read`","tags":["Design Proposals"],"x-scopes":["brand:urls:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/design-proposals/{designProposalId}/variants/{designProposalVariantId}/versions":{"get":{"operationId":"listDesignProposalVariantVersionsForProposal","summary":"List Design Proposal Variant Versions For Proposal","description":"List saved HTML versions for a design proposal variant\n\n**Required scopes:** `brand:urls:read`","tags":["Design Proposals"],"x-scopes":["brand:urls:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}},{"name":"designProposalVariantId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal variant ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants/{designProposalVariantId}/versions' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants/{designProposalVariantId}/versions', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/variants/{designProposalVariantId}/versions',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/design-proposals/{designProposalId}/regenerate":{"post":{"operationId":"postRegenerateDesignProposal","summary":"Post Regenerate Design Proposal","description":"Start a new AI revision for a design proposal\n\n**Required scopes:** `brand:urls:write`","tags":["Design Proposals"],"x-scopes":["brand:urls:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brief":{"type":"string","minLength":50,"maxLength":2000},"imageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"inspirationImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"companyImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"revisionInspirationImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"revisionCompanyImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":20},"revisionFeedback":{"type":"string","maxLength":4000},"lightAiModel":{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"],"default":"anthropic/claude-sonnet-4.6"},"aiModel":{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"],"default":"anthropic/claude-opus-4.7"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/regenerate' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/regenerate', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/regenerate',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/design-proposals/{designProposalId}/resume":{"post":{"operationId":"postResumeDesignProposalAiRun","summary":"Post Resume Design Proposal Ai Run","description":"Resume a paused design proposal AI run after the asset-selection gate\n\n**Required scopes:** `brand:urls:write`","tags":["Design Proposals"],"x-scopes":["brand:urls:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"designProposalId","in":"path","required":true,"schema":{"type":"string","description":"Design proposal ID"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aiRunId":{"type":"string","minLength":1},"inspirationImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":8,"default":[]},"companyImageAssetIds":{"type":"array","items":{"type":"string"},"maxItems":8,"default":[]},"useDetectedFonts":{"type":"boolean","default":true}},"required":["aiRunId"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/resume' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/resume', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/design-proposals/{designProposalId}/resume',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/design-proposals/search":{"get":{"operationId":"searchDesignProposalsForBrand","summary":"Search Design Proposals","description":"Search design proposals for a brand (returns DesignProposalDto, not AI runs). Use `search` for free text; optional `status` and `sortOrder` (createdAt). Caps at 50; `currentHtml` is null in list/search payloads — fetch by id for HTML.\n\n**Required scopes:** `brand:urls:read`","tags":["Design Proposals"],"x-scopes":["brand:urls:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Free-text search (display name, website name/url, brief)"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order by createdAt"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","generating","ready","failed"],"description":"Optional status filter (draft|generating|ready|failed); archived are never returned"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"dprop_1","orgId":"org_1","brandId":"br_1","displayName":"Acme homepage proposal","websiteName":"Acme","websiteUrl":"https://acme.example.com","brief":"Acme makes premium dog food for active urban breeds.","imageAssetIds":[],"inspirationImageAssetIds":[],"companyImageAssetIds":[],"creationSource":"ai","status":"ready","latestAiRunId":"air_1","currentHtml":"<!doctype html>...","currentHtmlRunId":"air_1","publishedVariantVersionId":null,"previewPublishMode":"off","previewPublicSlug":"aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899","previewPasswordUpdatedAt":null,"createdBy":null,"createdAt":"2026-08-19T08:40:32.625Z","updatedAt":"2026-08-19T08:40:32.625Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals/search' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals/search', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/brands/{brandId}/design-proposals/search',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/products/{productId}":{"get":{"operationId":"getProductById","summary":"Get Product By Id","description":"Get product details by passing the product id\n\n**Required scopes:** `product:read`","tags":["Product"],"x-scopes":["product:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"p_123","name":"Example Product","description":"Example Product Description","slug":"example-product","createdAt":"2026-08-19T08:40:32.628Z","updatedAt":"2026-08-19T08:40:32.628Z","brandId":"b_123","orgId":"o_123","integrationType":"shopify","externalId":"gid://shopify/Product/123","externalHandle":"example-product"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/products/{productId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/products/{productId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putProductById","summary":"Put Product By Id","description":"Public API endpoint: product.putProductById\n\n**Required scopes:** `product:write`","tags":["Product"],"x-scopes":["product:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"p_123","name":"Example Product","slug":"example-product","createdAt":"2026-08-19T08:40:32.628Z","updatedAt":"2026-08-19T08:40:32.628Z","brandId":"b_123","orgId":"o_123","integrationType":"shopify","externalId":"gid://shopify/Product/123","externalHandle":"example-product"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"enum":["null"],"nullable":true}]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/products/{productId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/products/{productId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/products/{productId}/landing-slugs":{"post":{"operationId":"addProductLandingSlug","summary":"Add Product Landing Slug","description":"Public API endpoint: product.addProductLandingSlug\n\n**Required scopes:** `product:write`","tags":["Product"],"x-scopes":["product:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"setAsPrimary":{"type":"boolean"}},"required":["slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]},"get":{"operationId":"listProductLandingSlugs","summary":"List Product Landing Slugs","description":"Public API endpoint: product.listProductLandingSlugs\n\n**Required scopes:** `product:read`","tags":["Product"],"x-scopes":["product:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/products/{productId}/landing-slugs/{landingSlugId}/retire":{"post":{"operationId":"retireProductLandingSlug","summary":"Retire Product Landing Slug","description":"Public API endpoint: product.retireProductLandingSlug\n\n**Required scopes:** `product:write`","tags":["Product"],"x-scopes":["product:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"landingSlugId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/retire' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/retire', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/retire',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/products/{productId}/landing-slugs/{landingSlugId}/set-primary":{"post":{"operationId":"setPrimaryProductLandingSlug","summary":"Set Primary Product Landing Slug","description":"Public API endpoint: product.setPrimaryProductLandingSlug\n\n**Required scopes:** `product:write`","tags":["Product"],"x-scopes":["product:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"landingSlugId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/set-primary' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/set-primary', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/products/{productId}/landing-slugs/{landingSlugId}/set-primary',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/meta/ad-claims":{"post":{"operationId":"claimAd","summary":"Claim Ad","description":"Claim an externally-launched Meta ad for tracking: registers the ad, anchors it to a Cognis creative (linked or a provisioned shell), writes an ownership binding, and applies custom fields. No launch is performed.\n\n**Required scopes:** `meta:ads:claim`","tags":["Meta"],"x-scopes":["meta:ads:claim"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"metaAdId":"1234567890","creativeId":"cr_abc123","provisioningMode":"api_track","creativeProvisioned":true,"ownershipBindingCreated":true,"topologyBindingCreated":false,"customFieldsApplied":2},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"adAccountId":{"type":"string","minLength":1},"metaAdId":{"type":"string","minLength":1},"metaAdsetId":{"type":"string","minLength":1},"metaCampaignId":{"type":"string","minLength":1},"metaCreativeId":{"type":"string","minLength":1},"adName":{"type":"string","minLength":1},"creative":{"type":"object","properties":{"creativeId":{"type":"string","minLength":1},"brandId":{"type":"string","minLength":1},"productId":{"type":"string","minLength":1},"countryCode":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"additionalProperties":false},"topology":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"productId":{"type":"string","minLength":1},"countryCode":{"type":"string","minLength":1},"campaignTypeId":{"type":"string","minLength":1}},"additionalProperties":false},"customFields":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"enum":["null"],"nullable":true}]}},"required":["value"],"additionalProperties":false}},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["adAccountId","metaAdId","creative"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/meta/ad-claims' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/meta/ad-claims', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/meta/ad-claims',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/integrations/{integrationId}/meta/launch-creative":{"post":{"operationId":"launchCreative","summary":"Launch Creative","description":"Headless launch: provision a lightweight creative + launch config + media and launch it through Cognis's Meta integration. Bypasses the creative-board workflow; the creative anchors custom fields, bindings, and Signals.\n\n**Required scopes:** `meta:launch:execute`","tags":["Integration"],"x-scopes":["meta:launch:execute"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"creativeId":"cr_abc123","launchId":"ml_def456","provisioningMode":"api_launch","variantsIngested":1,"customFieldsApplied":2},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creative":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"productId":{"type":"string","minLength":1},"countryCode":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["brandId"],"additionalProperties":false},"copy":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":50,"nullable":true},"primaryText":{"type":"string","maxLength":500,"nullable":true},"primaryTextTranslated":{"type":"string","maxLength":500,"nullable":true},"headline":{"type":"string","maxLength":100,"nullable":true},"headlineTranslated":{"type":"string","maxLength":100,"nullable":true},"description":{"type":"string","maxLength":100,"nullable":true},"descriptionTranslated":{"type":"string","maxLength":100,"nullable":true}},"required":["primaryText","primaryTextTranslated","headline","headlineTranslated","description","descriptionTranslated"],"additionalProperties":false},"minItems":1,"maxItems":5},"launch":{"type":"object","properties":{"campaignTypeId":{"type":"string","minLength":1},"adAccountId":{"type":"string","minLength":1},"pageId":{"type":"string","minLength":1},"brandUrlId":{"type":"string","minLength":1},"businessId":{"type":"string","minLength":1},"customEventType":{"type":"string","minLength":1},"urlParams":{"type":"string"},"sourceCurrency":{"type":"string","minLength":3,"maxLength":3}},"required":["campaignTypeId","adAccountId"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"hookSchemaId":{"type":"string","minLength":1,"nullable":true},"ctaSchemaId":{"type":"string","minLength":1,"nullable":true},"scrollStopperId":{"type":"string","minLength":1,"nullable":true},"adName":{"type":"string","minLength":1},"variantLabel":{"type":"string","minLength":1},"media":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"},"fileName":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload"]},"mediaAssetId":{"type":"string","minLength":1}},"required":["kind","mediaAssetId"],"additionalProperties":false}]},"customFields":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"enum":["null"],"nullable":true}]}},"required":["value"],"additionalProperties":false}}},"required":["media"],"additionalProperties":false},"minItems":1},"customFields":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"enum":["null"],"nullable":true}]}},"required":["value"],"additionalProperties":false}}},"required":["creative","copy","launch","variants"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/integrations/{integrationId}/meta/launch-creative' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/integrations/{integrationId}/meta/launch-creative', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/integrations/{integrationId}/meta/launch-creative',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/storefront-product-reviews/{reviewId}":{"delete":{"operationId":"deleteReview","summary":"Delete Review","description":"Public API endpoint: ecomReviews.deleteReview\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Reviews"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"reviewId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"ok":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ecom/storefront-product-reviews/enqueue-translations":{"post":{"operationId":"enqueueApprovedReviewTranslations","summary":"Enqueue Approved Review Translations","description":"Public API endpoint: ecomReviews.enqueueApprovedReviewTranslations\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Reviews"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"enqueuedCount":1,"reviewCount":1},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","minLength":1}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/enqueue-translations' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/enqueue-translations', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/enqueue-translations',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/enqueue-translations":{"post":{"operationId":"enqueueReviewTranslations","summary":"Enqueue Review Translations","description":"Public API endpoint: ecomReviews.enqueueReviewTranslations\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Reviews"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"reviewId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"enqueued":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/enqueue-translations' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/enqueue-translations', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/storefront-product-reviews/{reviewId}/enqueue-translations',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/ecom-description":{"put":{"operationId":"putEcomDescription","summary":"Put Ecom Description","description":"Public API endpoint: ecomProduct.putEcomDescription\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"changed":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000}},"required":["text"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-description' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-description', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/ecom-description',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ecom/products/{productId}/sync-gmc":{"post":{"operationId":"syncGmc","summary":"Sync Gmc","description":"Push one storefront-published catalog product into the brand Google Merchant Center sub-account under the org MCA.\n\n**Required scopes:** `org:ecom:collections:write`","tags":["Commerce Products"],"x-scopes":["org:ecom:collections:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"71xBzz4f8IryLqHXNXs3Fq","productId":"1EMPkVAtoQdWqulEy8vIpN","syncStatus":"active","productCount":1},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sync-gmc' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sync-gmc', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ecom/products/{productId}/sync-gmc',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/google-shopping-settings/store-ratings":{"put":{"operationId":"putStoreRatingsSettings","summary":"Put Store Ratings Settings","description":"Public API endpoint: ecomGoogleShopping.putStoreRatingsSettings\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Google Shopping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"brandId":"1","orgId":"2","orgMerchantCenterIntegrationId":"3","gmcSubAccountId":"987654321","dataSourceId":null,"syncStatus":"pending","orgGmcConnected":true,"orgMcaAccountId":"123456789","orgMcaAccountType":"advanced","orgGcpRegistered":true,"freeListingsStatus":"enabled","shoppingAdsProgramState":"eligible","productRatingsProgramState":"unknown","ga4LinkedToGmc":false,"ga4LinkPending":false,"ga4PropertyId":null,"storeRatingsOptInEnabled":false,"markets":[{"feedLabel":"US","currencyCode":"USD","contentLanguage":"en","source":"main","dataSourceId":null,"hasDataSource":false,"shippingAttached":false,"skipReason":"missing_data_source"}],"updatedAt":"2026-06-18T12:00:00.000Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeRatingsOptInEnabled":{"type":"boolean"}},"required":["storeRatingsOptInEnabled"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/store-ratings' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/store-ratings', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/store-ratings',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/brands/{brandId}/ecom/google-shopping-settings/sync":{"post":{"operationId":"syncGmcProducts","summary":"Sync Gmc Products","description":"Public API endpoint: ecomGoogleShopping.syncGmcProducts\n\n**Required scopes:** `brand:settings:write`","tags":["Commerce Google Shopping"],"x-scopes":["brand:settings:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","description":"Brand ID (prefix: br_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"syncStatus":"active","productCount":12},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/sync' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/sync', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/brands/{brandId}/ecom/google-shopping-settings/sync',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}":{"get":{"operationId":"getDocLibraryById","summary":"Get Doc Library By Id","description":"Public API endpoint: docs.getDocLibraryById\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"30","name":"Getting Started","description":"Onboarding documentation and quickstart guides","slug":"getting-started","visibility":"private","status":"draft","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/{docLibraryId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocLibraryById","summary":"Put Doc Library By Id","description":"Public API endpoint: docs.putDocLibraryById\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"30","name":"Getting Started","description":"Onboarding documentation and quickstart guides","slug":"getting-started","visibility":"private","status":"draft","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"slug":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","organization","public","app_lock"]},"status":{"type":"string","enum":["draft","published"]}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/{docLibraryId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/sections/{docSectionId}":{"get":{"operationId":"getDocSectionById","summary":"Get Doc Section By Id","description":"Public API endpoint: docs.getDocSectionById\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"40","name":"Overview","description":"High-level overview for this documentation library","status":"draft","slug":"overview","sortIndex":0,"embeddingsEnabled":false,"firstPageId":"123","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","groups":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocSectionById","summary":"Put Doc Section By Id","description":"Public API endpoint: docs.putDocSectionById\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"40","name":"Overview","description":"High-level overview for this documentation library","status":"draft","slug":"overview","sortIndex":0,"embeddingsEnabled":false,"firstPageId":"123","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","groups":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"slug":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","published"]},"embeddingsEnabled":{"type":"boolean"}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections":{"get":{"operationId":"listDocLibrarySections","summary":"List Doc Library Sections","description":"Public API endpoint: docs.listDocLibrarySections\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","description","status","slug","sortIndex","embeddingsEnabled","createdAt","updatedAt","orgId","docLibraryId","firstPageId","groups"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","status","slug","sortIndex","embeddingsEnabled","createdAt","updatedAt","orgId","docLibraryId","firstPageId","groups"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","name","description","status","slug","sortIndex","embeddingsEnabled","createdAt","updatedAt","orgId","docLibraryId","firstPageId","groups"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"40","name":"Overview","description":"High-level overview for this documentation library","status":"draft","slug":"overview","sortIndex":0,"embeddingsEnabled":false,"firstPageId":"123","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","groups":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}]}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postDocLibrarySection","summary":"Post Doc Library Section","description":"Public API endpoint: docs.postDocLibrarySection\n\n**Required scopes:** `org:docs:create`","tags":["Docs"],"x-scopes":["org:docs:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"40","name":"Overview","description":"High-level overview for this documentation library","status":"draft","slug":"overview","sortIndex":0,"embeddingsEnabled":false,"firstPageId":"123","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","groups":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}]},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"slug":{"type":"string","minLength":1}},"required":["name","slug"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/reorder":{"post":{"operationId":"reorderDocLibrarySections","summary":"Reorder Doc Library Sections","description":"Public API endpoint: docs.reorderDocLibrarySections\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"40","name":"Overview","description":"High-level overview for this documentation library","status":"draft","slug":"overview","sortIndex":0,"embeddingsEnabled":false,"firstPageId":"123","createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","groups":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}]}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortIndex":{"type":"integer","minimum":0}},"required":["id","sortIndex"],"additionalProperties":false},"minItems":1}},"required":["updates"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/reorder' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/reorder', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/reorder',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/pages/{docPageId}":{"delete":{"operationId":"deleteDocPageById","summary":"Delete Doc Page By Id","description":"Public API endpoint: docs.deleteDocPageById\n\n**Required scopes:** `org:docs:delete`","tags":["Docs"],"x-scopes":["org:docs:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docPageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/docs/pages/{docPageId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"get":{"operationId":"getDocPageById","summary":"Get Doc Page By Id","description":"Public API endpoint: docs.getDocPageById\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docPageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"page":{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null,"faqs":[]},"docPageMetaEpoch":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/pages/{docPageId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocPageById","summary":"Put Doc Page By Id","description":"Public API endpoint: docs.putDocPageById\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docPageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"page":{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null},"nextMetaEpoch":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"isIndexPage":{"type":"boolean"},"sortIndex":{"type":"integer"},"parentId":{"type":"string","nullable":true},"groupId":{"type":"string","nullable":true},"faqs":{"type":"array","items":{"type":"object","properties":{"sortIndex":{"type":"integer","minimum":0},"questionMarkdown":{"type":"string","maxLength":8000},"answerMarkdown":{"type":"string","maxLength":8000}},"required":["sortIndex","questionMarkdown","answerMarkdown"],"additionalProperties":false},"maxItems":40},"expectedMetaEpoch":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/pages/{docPageId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/{docSectionId}/pages":{"get":{"operationId":"listDocSectionPages","summary":"List Doc Section Pages","description":"Public API endpoint: docs.listDocSectionPages\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","title","description","status","isIndexPage","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId","parentId","groupId"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","title","description","status","isIndexPage","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId","parentId","groupId"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","title","description","status","isIndexPage","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId","parentId","groupId"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postDocPage","summary":"Post Doc Page","description":"Public API endpoint: docs.postDocPage\n\n**Required scopes:** `org:docs:create`","tags":["Docs"],"x-scopes":["org:docs:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"parentId":{"type":"string","nullable":true},"sortIndex":{"type":"integer"},"content":{"type":"string"},"format":{"type":"string","enum":["markdown","plain_text"]},"groupId":{"type":"string","nullable":true},"faqs":{"type":"array","items":{"type":"object","properties":{"sortIndex":{"type":"integer","minimum":0},"questionMarkdown":{"type":"string","maxLength":8000},"answerMarkdown":{"type":"string","maxLength":8000}},"required":["sortIndex","questionMarkdown","answerMarkdown"],"additionalProperties":false},"maxItems":40}},"required":["title"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/{docSectionId}/pages/reorder":{"post":{"operationId":"reorderDocSectionPages","summary":"Reorder Doc Section Pages","description":"Public API endpoint: docs.reorderDocSectionPages\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"pg-example-1","title":"Getting Started","description":"Introduction to the API","status":"published","isIndexPage":false,"sortIndex":0,"createdAt":"2025-01-01T00:00:00.000Z","updatedAt":"2025-01-01T00:00:00.000Z","orgId":"org-example","docLibraryId":"dl-example","sectionId":"dls-example","parentId":null,"groupId":null}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string","nullable":true},"sortIndex":{"type":"integer","minimum":0},"isIndexPage":{"type":"boolean"},"groupId":{"type":"string","nullable":true}},"required":["id","parentId","sortIndex"],"additionalProperties":false},"minItems":1}},"required":["updates"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages/reorder' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages/reorder', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/pages/reorder',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}":{"delete":{"operationId":"deleteDocSectionGroup","summary":"Delete Doc Section Group","description":"Public API endpoint: docs.deleteDocSectionGroup\n\n**Required scopes:** `org:docs:delete`","tags":["Docs"],"x-scopes":["org:docs:delete"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionGroupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X DELETE 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}', {\n  method: 'DELETE',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.delete('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocSectionGroup","summary":"Put Doc Section Group","description":"Public API endpoint: docs.putDocSectionGroup\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionGroupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"sortIndex":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/{docSectionGroupId}',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/{docSectionId}/groups":{"get":{"operationId":"listDocSectionGroups","summary":"List Doc Section Groups","description":"Public API endpoint: docs.listDocSectionGroups\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","name","sortIndex","createdAt","updatedAt","orgId","docLibraryId","sectionId"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postDocSectionGroup","summary":"Post Doc Section Group","description":"Public API endpoint: docs.postDocSectionGroup\n\n**Required scopes:** `org:docs:create`","tags":["Docs"],"x-scopes":["org:docs:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"sortIndex":{"type":"integer"}},"required":["name"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/sections/{docSectionId}/groups/reorder":{"post":{"operationId":"reorderDocSectionGroups","summary":"Reorder Doc Section Groups","description":"Public API endpoint: docs.reorderDocSectionGroups\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[{"id":"50","name":"Getting Started Guides","sortIndex":0,"createdAt":"2025-01-01T19:42:28.687Z","updatedAt":"2025-01-02T10:15:00.000Z","orgId":"1","docLibraryId":"30","sectionId":"40"}],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sortIndex":{"type":"integer","minimum":0}},"required":["id","sortIndex"],"additionalProperties":false},"minItems":1}},"required":["updates"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/reorder' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/reorder', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/sections/{docSectionId}/groups/reorder',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/sections/{docSectionId}/embeddings/overview":{"get":{"operationId":"getDocSectionEmbeddingsIndexOverview","summary":"Get Doc Section Embeddings Index Overview","description":"Public API endpoint: docs.getDocSectionEmbeddingsIndexOverview\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"rows":[],"truncated":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/overview' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/overview', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/overview',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/docs/sections/{docSectionId}/embeddings/query-test":{"post":{"operationId":"postDocSectionEmbeddingsQueryTest","summary":"Post Doc Section Embeddings Query Test","description":"Embed a natural-language query and run pgvector similarity against chunks for this doc section (dashboard diagnostics).\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"results":[],"embedMs":0,"searchMs":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":16000},"limit":{"type":"integer","minimum":1,"maximum":25}},"required":["query"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/query-test' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/query-test', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/query-test',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/sections/{docSectionId}/embeddings/reindex":{"post":{"operationId":"postDocSectionEmbeddingsReindex","summary":"Post Doc Section Embeddings Reindex","description":"Queue doc pages for embedding refresh, then run an immediate bounded flush scoped to this section (Pub/Sub → worker-short). Organic edits still rely on the quarter_hour cron after debounce. Omit body or leave docPageId unset to refresh all pages in the section; set docPageId to refresh one page only. Remaining rows drain on the next cron tick.\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docSectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"enqueued":0,"jobsDispatched":0,"dispatchFailures":0,"flushTruncated":false,"immediateFlushSkipped":false},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"docPageId":{"type":"string","minLength":1}},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/reindex' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/reindex', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/docs/sections/{docSectionId}/embeddings/reindex',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/{docLibraryId}/intro":{"get":{"operationId":"getDocLibraryIntroContent","summary":"Get Doc Library Intro Content","description":"Public API endpoint: docs.getDocLibraryIntroContent\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["markdown","plain_text"],"default":"markdown"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"content":"Welcome","format":"plain_text","introEpoch":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocLibraryIntroContent","summary":"Put Doc Library Intro Content","description":"Public API endpoint: docs.putDocLibraryIntroContent\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docLibraryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"introEpoch":1},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"format":{"type":"string","enum":["markdown","plain_text"]},"expectedIntroEpoch":{"type":"integer","minimum":0}},"required":["content","format"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/{docLibraryId}/intro',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/docs/pages/{docPageId}/body":{"get":{"operationId":"getDocPageBodyContent","summary":"Get Doc Page Body Content","description":"Public API endpoint: docs.getDocPageBodyContent\n\n**Required scopes:** `org:docs:read`","tags":["Docs"],"x-scopes":["org:docs:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docPageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["markdown","plain_text"],"default":"markdown"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"content":"# Hello\n\nWorld","format":"markdown","bodyEpoch":0},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"put":{"operationId":"putDocPageBodyContent","summary":"Put Doc Page Body Content","description":"Public API endpoint: docs.putDocPageBodyContent\n\n**Required scopes:** `org:docs:write`","tags":["Docs"],"x-scopes":["org:docs:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"docPageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"bodyEpoch":1},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"format":{"type":"string","enum":["markdown","plain_text"]},"expectedBodyEpoch":{"type":"integer","minimum":0}},"required":["content","format"],"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X PUT 'https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body', {\n  method: 'PUT',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.put('https://api.cognissuite.com/api/v1/docs/pages/{docPageId}/body',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/check-propagation":{"post":{"operationId":"checkAiRunPropagationStep","summary":"Check Ai Run Propagation Step","description":"Poll DNS/propagation for a brand-launch step that waits on domain propagation (e.g. after Cloudflare attach).\n\n**Required scopes:** `org:airuns:write`","tags":["AI Runs"],"x-scopes":["org:airuns:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"aiRunId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepExecutionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"success":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/check-propagation' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/check-propagation', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/check-propagation',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/ai-runs/{aiRunId}":{"get":{"operationId":"getAiRunById","summary":"Get Ai Run By Id","description":"Get a single AI run by id (status, phase, current step, output).\n\n**Required scopes:** `org:airuns:read`","tags":["AI Runs"],"x-scopes":["org:airuns:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"aiRunId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"ar_123","sid":"ar_123","orgId":"o_123","brandId":"b_123","productId":"p_123","frameworkId":null,"runType":"research","name":"Example AI Run","description":"Example description","stepDefinitions":[],"status":"pending","phase":null,"currentStepId":null,"inputData":null,"outputData":null,"failedStepId":null,"retryCount":0,"maxRetries":3,"createdBy":"u_123","createdAt":"2026-08-19T08:40:32.766Z","updatedAt":"2026-08-19T08:40:32.766Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/ai-runs/{aiRunId}' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/ai-runs/{aiRunId}', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/ai-runs/{aiRunId}',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ai-runs/{aiRunId}/executions":{"get":{"operationId":"listAiExecutionsForRun","summary":"List Ai Executions For Run","description":"List step executions for an AI run (poll run progress). Use list `fields` to request the lightweight poll subset or full step rows.\n\n**Required scopes:** `org:airuns:read`","tags":["AI Runs"],"x-scopes":["org:airuns:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"aiRunId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","runId","chainStepId","status","attemptNumber","generationId","inputData","outputData","responseSteps","errorMessage","errorStack","startedAt","completedAt","createdAt","updatedAt","listerSearchText"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","runId","chainStepId","status","attemptNumber","generationId","inputData","outputData","responseSteps","errorMessage","errorStack","startedAt","completedAt","createdAt","updatedAt","listerSearchText"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","runId","chainStepId","status","attemptNumber","generationId","inputData","outputData","responseSteps","errorMessage","errorStack","startedAt","completedAt","createdAt","updatedAt","listerSearchText"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}},"/org/{orgId}/ai-runs":{"get":{"operationId":"listAiRunsForOrg","summary":"List Ai Runs","description":"List AI runs for an org. Supports standard list `filters` (e.g. `runType` eq research, `productId` eq, `frameworkId` eq) plus search/sort/pagination.\n\n**Required scopes:** `org:airuns:read`","tags":["AI Runs"],"x-scopes":["org:airuns:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateBy","in":"query","required":false,"schema":{"type":"string","default":"createdAt"}},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["id","orgId","brandId","productId","frameworkId","creativeId","designProposalVariantId","runType","name","description","status","phase","currentStepId","inputData","outputData","failedStepId","retryCount","maxRetries","hasOverrideSuggestions","suggestionAvatarContextIds","suggestionProblemContextIds","suggestionPainPointContextIds","overrideSuggestionsSummary","createdBy","listerSearchText","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["field"],"additionalProperties":false},"default":[{"field":"createdAt","order":"desc"}]}},{"name":"fields","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orgId","brandId","productId","frameworkId","creativeId","designProposalVariantId","runType","name","description","status","phase","currentStepId","inputData","outputData","failedStepId","retryCount","maxRetries","hasOverrideSuggestions","suggestionAvatarContextIds","suggestionProblemContextIds","suggestionPainPointContextIds","overrideSuggestionsSummary","createdBy","listerSearchText","createdAt","updatedAt"]},"default":["id"]}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"type":"string","enum":["group"]},"op":{"type":"string","enum":["and","or"]},"children":{"type":"array","items":{"anyOf":[{},{"type":"object","properties":{"type":{"type":"string","enum":["rule"]},"field":{"type":"string","enum":["id","orgId","brandId","productId","frameworkId","creativeId","designProposalVariantId","runType","name","description","status","phase","currentStepId","inputData","outputData","failedStepId","retryCount","maxRetries","hasOverrideSuggestions","suggestionAvatarContextIds","suggestionProblemContextIds","suggestionPainPointContextIds","overrideSuggestionsSummary","createdBy","listerSearchText","createdAt","updatedAt"]},"operator":{"type":"string","enum":["eq","neq","in","not_in","is_set","is_not_set","gt","gte","lt","lte","between","contains","not_contains","starts_with","ends_with"]},"value":{}},"required":["type","field","operator"],"additionalProperties":false}]},"minItems":1}},"required":["type","op","children"],"additionalProperties":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]},"post":{"operationId":"postAiRun","summary":"Post Ai Run","description":"Create an AI run. Body is discriminated by `runType` (e.g. `brand-launch`, `product-ingest`, `research`, framework types).\n\n**Required scopes:** `org:airuns:create`","tags":["AI Runs"],"x-scopes":["org:airuns:create"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"id":"ar_123","sid":"ar_123","orgId":"o_123","brandId":"b_123","productId":"p_123","frameworkId":null,"runType":"research","name":"Example AI Run","description":"Example description","stepDefinitions":[],"status":"pending","phase":null,"currentStepId":null,"inputData":null,"outputData":null,"failedStepId":null,"retryCount":0,"maxRetries":3,"createdBy":"u_123","createdAt":"2026-08-19T08:40:32.766Z","updatedAt":"2026-08-19T08:40:32.766Z"},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"runType":{"type":"string","enum":["research"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"productId":{"type":"string"},"aiModel":{"type":"string","enum":["openai/gpt-5.5-pro","anthropic/claude-opus-4-6","openai/o4-mini-deep-research","openai/o3-deep-research"]},"frameworkId":{"type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["brand_competitors","amazon_reviews","amazon_listings","reddit_threads","research_studies","custom_sources"]},"minItems":1},"insightIds":{"type":"array","items":{"type":"string"},"minItems":1},"aiPrompt":{"type":"string"},"suggestOverrideUpdates":{"type":"boolean","default":true},"suggestOverrideAvatarIds":{"type":"array","items":{"type":"string"}},"suggestOverrideProblemIds":{"type":"array","items":{"type":"string"}},"suggestOverridePainPointIds":{"type":"array","items":{"type":"string"}}},"required":["runType","productId","aiModel","sources","insightIds"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["static-ad","scripted-ad","landing-page-copy"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"productId":{"type":"string"},"creativeId":{"type":"string"},"countryCode":{"type":"string","enum":["SE","NO","DK","FI","NL","BE","IT","ES","US","CA","GB","AU","AT","CH","DE","FR","BIG4","DE_SPEAKING","EU_ENGLISH"]},"structureType":{"type":"string","enum":["framework","competitor_imitation","freeform"],"default":"framework"},"avatarId":{"type":"string"},"authorityFigureId":{"type":"string"},"ideationOriginId":{"type":"string"},"angleId":{"type":"string"},"awarenessLevelId":{"type":"string"},"painPointId":{"type":"string"},"creativeTypeId":{"type":"string"},"adFormatId":{"type":"string"},"frameworkId":{"type":"string"},"subtitleStyleId":{"type":"string"},"offerId":{"type":"string"},"campaignTypeId":{"type":"string"},"marketSophisticationLevelId":{"type":"string"},"notes":{"type":"string"},"hypothesis":{"type":"string"},"exampleAd":{"type":"string"},"editingNotes":{"type":"string"},"contributorNotes":{"type":"string"},"llmNotes":{"type":"string"},"testingConfig":{"type":"object","properties":{"frameworkInstanceId":{"type":"string"},"enabled":{"type":"boolean"}},"required":["frameworkInstanceId","enabled"],"additionalProperties":false},"contributorId":{"type":"string"}},"required":["runType","productId","countryCode"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["creative-translation"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"productId":{"type":"string"},"creativeId":{"type":"string"},"sourceCreativeId":{"type":"string"},"countryCode":{"type":"string","enum":["SE","NO","DK","FI","NL","BE","IT","ES","US","CA","GB","AU","AT","CH","DE","FR","BIG4","DE_SPEAKING","EU_ENGLISH"]}},"required":["runType","productId","creativeId","sourceCreativeId","countryCode"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["product-discovery"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"aiModel":{"anyOf":[{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"]},{"type":"string","enum":["openai/gpt-5.5-pro","anthropic/claude-opus-4-6","openai/o4-mini-deep-research","openai/o3-deep-research"]}]},"sources":{"type":"array","items":{"type":"string","enum":["brand_competitors","amazon_reviews","amazon_listings","reddit_threads","research_studies","custom_sources"]},"default":[]},"niche":{"type":"string","minLength":1},"targetMarkets":{"type":"array","items":{"type":"string","enum":["EU","US"]}},"candidateCount":{"type":"integer","minimum":1,"maximum":50},"marketplaces":{"type":"array","items":{"type":"string","enum":["aliexpress"]}},"avoidList":{"type":"array","items":{"type":"string"}},"productStylePreference":{"type":"string"},"notes":{"type":"string"},"discoveryDefaults":{"type":"object","properties":{"defaultCandidateCount":{"type":"integer","minimum":1,"maximum":50},"defaultTargetMarkets":{"type":"array","items":{"type":"string","enum":["EU","US"]}},"marketplacePriority":{"type":"array","items":{"type":"string","enum":["aliexpress"]}},"avoidCategories":{"type":"array","items":{"type":"string"}},"skipShoeItems":{"type":"boolean"},"allowIdeaOnlyCandidates":{"type":"boolean"},"requireAliExpressLink":{"type":"boolean"},"defaultSourcingMode":{"type":"string","enum":["google_cse","model_web_tools"]}},"additionalProperties":false},"sourcingMode":{"type":"string","enum":["google_cse","model_web_tools"]}},"required":["runType","aiModel","niche"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["product-ingest"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"aiModel":{"anyOf":[{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"]},{"type":"string","enum":["openai/gpt-5.5-pro","anthropic/claude-opus-4-6","openai/o4-mini-deep-research","openai/o3-deep-research"]}]},"sourceUrl":{"type":"string","format":"uri"},"notes":{"type":"string"},"generateImagesOnCreate":{"type":"boolean","default":true},"imageGenModel":{"type":"string","enum":["google/gemini-2.5-flash-image","google/gemini-3-pro-image"]},"imageCount":{"type":"integer","minimum":1,"maximum":4},"imageBackgroundStyle":{"type":"string","enum":["auto","white","niche_light"],"default":"niche_light"}},"required":["runType","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["product-page-ingest"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"aiModel":{"anyOf":[{"type":"string","enum":["google/gemini-3-flash","google/gemini-3-pro-preview","google/gemini-3.1-pro-preview","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","anthropic/claude-haiku-4.5","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","openai/gpt-5.5","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5-pro"]},{"type":"string","enum":["openai/gpt-5.5-pro","anthropic/claude-opus-4-6","openai/o4-mini-deep-research","openai/o3-deep-research"]}]},"sourceUrl":{"type":"string","format":"uri"},"scrapeStrategy":{"type":"string","enum":["auto","render_false","render_true","ai_extract"],"default":"auto"},"targetMarket":{"type":"string","enum":["SE","US","EU"],"default":"SE"},"brandToStrip":{"type":"string"},"generateImagesOnCreate":{"type":"boolean","default":false},"imageGenModel":{"type":"string","enum":["google/gemini-2.5-flash-image","google/gemini-3-pro-image"]},"imageCount":{"type":"integer","minimum":1,"maximum":4},"imageBackgroundStyle":{"type":"string","enum":["auto","white","niche_light"],"default":"niche_light"},"notes":{"type":"string"}},"required":["runType","aiModel","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"runType":{"type":"string","enum":["brand-launch"]},"name":{"type":"string","maxLength":255},"description":{"type":"string","nullable":true},"launchMode":{"type":"string","enum":["create_new","extend_existing"]},"domainSource":{"type":"string","enum":["reuse_existing","purchase_new","porkbun_existing"]},"existingBrandId":{"type":"string"},"existingDomainId":{"type":"string"},"brandName":{"type":"string","minLength":1},"brandDescription":{"type":"string"},"brandSlug":{"type":"string"},"selectedDomain":{"type":"string"},"selectedTld":{"type":"string"},"cloudflareIntegrationId":{"type":"string","minLength":1},"porkbunIntegrationId":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]},"inheritOrgLanguages":{"type":"boolean","default":true},"inheritOrgCurrency":{"type":"boolean","default":true}},"required":["runType","launchMode","domainSource","brandName","cloudflareIntegrationId"],"additionalProperties":false}]}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/retry":{"post":{"operationId":"retryAiRunStep","summary":"Retry Ai Run Step","description":"Retry a failed AI run step execution (user-initiated).\n\n**Required scopes:** `org:airuns:write`","tags":["AI Runs"],"x-scopes":["org:airuns:write"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"aiRunId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepExecutionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":{"success":true},"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/retry' -H 'Authorization: Bearer cogn_xxx'\n  -H 'Content-Type: application/json'\n  -d '{\"key\": \"value\"}'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/retry', {\n  method: 'POST',\n  headers: { 'Authorization': 'Bearer cogn_xxx', 'Content-Type': 'application/json' },\n  body: JSON.stringify({})\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.post('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/{aiRunId}/executions/{stepExecutionId}/retry',\n  headers={'Authorization': 'Bearer cogn_xxx'},\n  json={})\ndata = r.json()"}]}},"/org/{orgId}/ai-runs/search":{"get":{"operationId":"searchAiRunsForOrg","summary":"Search Ai Runs","description":"Search AI runs for an organization. Use `search` for free text; optional `runType` (e.g. research) and `productId` map to lister filters; `sortOrder` sorts by createdAt.\n\n**Required scopes:** `org:airuns:read`","tags":["AI Runs"],"x-scopes":["org:airuns:read"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string","description":"Organization ID (prefix: org_)"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Free-text search for AI runs"}},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order by createdAt"}},{"name":"runType","in":"query","required":false,"schema":{"type":"string","enum":["research","static-ad","scripted-ad","landing-page-copy","creative-translation","blog","blog-translation","design-proposal","product-discovery","product-ingest","product-page-ingest","brand-launch"],"description":"Restrict to this run type (e.g. research)"}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","description":"Restrict to runs for this product (SID)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"message":{"type":"string"},"traceId":{"type":"string"},"meta":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"},"totalItems":{"type":"integer"}}}}}}},"example":{"success":true,"data":[],"message":"Success","traceId":"req_abc123"}}}},"400":{"description":"Bad request — validation error or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid data","errors":[{"code":400,"message":"Invalid data"}],"traceId":"req_xxx"}}}},"401":{"description":"Unauthorized — invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized","errors":[{"code":401,"message":"Unauthorized"}],"traceId":"req_xxx"}}}},"403":{"description":"Forbidden — insufficient permissions or api_allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden","errors":[{"code":403,"message":"Forbidden"}],"traceId":"req_xxx"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not found","errors":[{"code":404,"message":"Not found"}],"traceId":"req_xxx"}}}},"409":{"description":"Conflict — e.g. unique violation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Conflict","errors":[{"code":409,"message":"Conflict"}],"traceId":"req_xxx"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests — rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rate limit exceeded","errors":[],"traceId":"req_xxx"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unexpected error","errors":[{"code":500,"message":"Unexpected error"}],"traceId":"req_xxx"}}}}},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X GET 'https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/search' -H 'Authorization: Bearer cogn_xxx'"},{"lang":"js","label":"JavaScript (fetch)","source":"const res = await fetch('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/search', {\n  method: 'GET',\n  headers: { 'Authorization': 'Bearer cogn_xxx' }\n});\nconst data = await res.json();"},{"lang":"python","label":"Python (requests)","source":"import requests\nr = requests.get('https://api.cognissuite.com/api/v1/org/{orgId}/ai-runs/search',\n  headers={'Authorization': 'Bearer cogn_xxx'})\ndata = r.json()"}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key (prefix: cogn_) from Account → Developer"}},"schemas":{"ErrorResponse":{"type":"object","required":["success","message","errors"],"properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string","description":"Human-readable error message"},"errors":{"type":"array","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"number","description":"Error code"},"message":{"type":"string"},"details":{"type":"object"}}}},"traceId":{"type":"string","description":"Request ID for tracing"},"params":{"type":"object","description":"Validation params for interpolation"},"readableMessage":{"type":"string","description":"Human-readable validation message"}}}}},"security":[{"bearerAuth":[]}]}