{"info":{"title":"Hephon Commerce API","version":"1.0.0"},"servers":[{"url":"/api"}],"openapi":"3.1.1","paths":{"/auth/check-email-status":{"post":{"operationId":"auth.checkEmailStatus","summary":"Check email verification status","description":"Check if an email exists and whether it needs verification. Only call after signup attempt fails with user already exists error.","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/contact":{"post":{"operationId":"contactForm.submit","summary":"Request a demo","tags":["Contact"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email"},"name":{"type":"string","minLength":2,"maxLength":100},"company":{"type":"string","minLength":2,"maxLength":120},"country":{"type":"string","maxLength":80},"channels":{"type":"array","maxItems":3,"items":{"enum":["app","whatsapp","voice"],"type":"string"}},"message":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":200}},"required":["email","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/generate-slug":{"get":{"operationId":"organizations.generateSlug","summary":"Generate organization slug","description":"Generate a unique slug from an organization name","tags":["Organizations"],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/logo-upload-url":{"post":{"operationId":"organizations.createLogoUploadUrl","summary":"Create logo upload URL","description":"Create a signed upload URL to upload an logo image to the storage bucket","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}},"required":["organizationId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/avatar-upload-url":{"post":{"operationId":"users.avatarUploadUrl","summary":"Create avatar upload URL","description":"Create a signed upload URL to upload an avatar image to the storage bucket","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/export":{"get":{"operationId":"users.exportData","summary":"Export user data","description":"Export all personal data associated with the current user (GDPR compliance)","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/delete-account":{"post":{"operationId":"users.requestDeletion","summary":"Request account deletion","description":"Schedule account for deletion with a 30-day grace period (GDPR compliance)","tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/cancel-deletion":{"post":{"operationId":"users.cancelDeletion","summary":"Cancel account deletion","description":"Cancel a scheduled account deletion during the grace period","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/deletion-status":{"get":{"operationId":"users.deletionStatus","summary":"Get account deletion status","description":"Check if account is scheduled for deletion","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/users/save-onboarding-step":{"post":{"operationId":"users.saveOnboardingStep","summary":"Save onboarding step progress","tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"step":{"type":"number","minimum":1,"maximum":5},"firstName":{"type":"string","minLength":1,"maxLength":50},"lastName":{"type":"string","minLength":1,"maxLength":50},"jobRole":{"type":"string","maxLength":100},"focusAreas":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":100}},"toolsUsed":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":100}},"organizationId":{"type":"string"},"industry":{"type":"string","maxLength":100},"companySize":{"type":"string","maxLength":50},"companyWebsite":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"const":""}]},"referralSource":{"type":"string","maxLength":200},"companyName":{"type":"string","maxLength":100}},"required":["step"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/payments/create-checkout-link":{"post":{"operationId":"payments.createCheckoutLink","summary":"Create checkout link","description":"Creates a checkout link for a one-time or subscription product","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"enum":["one-time","subscription"],"type":"string"},"productId":{"type":"string"},"redirectUrl":{"type":"string"},"organizationId":{"type":"string"}},"required":["type","productId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/payments/create-customer-portal-link":{"post":{"operationId":"payments.createCustomerPortalLink","summary":"Create customer portal link","description":"Creates a customer portal link for the customer or team. If a purchase is provided, the link will be created for the customer of the purchase.","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purchaseId":{"type":"string"},"redirectUrl":{"type":"string"}},"required":["purchaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/payments/plan-limits":{"get":{"operationId":"payments.getPlanLimits","summary":"Get plan limits and usage","description":"Get the current plan limits and usage for an organization","tags":["Payments"],"parameters":[{"name":"organizationId","in":"query","required":true,"schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/payments/purchases":{"get":{"operationId":"payments.listPurchases","summary":"Get purchases","description":"Get all purchases of the current user or the provided organization","tags":["Payments"],"parameters":[{"name":"organizationId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/audit-logs":{"get":{"operationId":"audit.organization.list","summary":"List organization audit logs","tags":["Audit"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"action","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"number","minimum":0,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/admin/audit-logs":{"get":{"operationId":"audit.admin.list","summary":"List all audit logs (admin only)","tags":["Administration","Audit"],"parameters":[{"name":"userId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"organizationId","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"action","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"resourceType","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"number","minimum":0,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/api-keys":{"post":{"operationId":"apiKeys.create","summary":"Create a new API key","description":"Create an API key for an organization with scopes, an optional IP allow-list and an optional expiry","tags":["API Keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","minItems":1,"items":{"enum":["chat:write","conversations:read","sessions:write","catalog:read","catalog:write","orders:read","orders:write","shoppers:write","usage:read","mcp:use","*"],"type":"string"}},"allowedIps":{"type":"array","maxItems":50,"items":{"type":"string"},"default":[]},"expiresAt":{"type":"string","format":"date-time"}},"required":["organizationId","name","scopes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/api-keys/{organizationId}":{"get":{"operationId":"apiKeys.list","summary":"List organization API keys","description":"List all API keys for an organization","tags":["API Keys"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/api-keys/{id}":{"patch":{"operationId":"apiKeys.update","summary":"Rename an API key or change its IP allow-list","tags":["API Keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"allowedIps":{"type":"array","maxItems":50,"items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/api-keys/{id}/rotate":{"post":{"operationId":"apiKeys.rotate","summary":"Rotate an API key","tags":["API Keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"overlapHours":{"type":"integer","minimum":0,"maximum":168,"default":24},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/api-keys/{id}/revoke":{"post":{"operationId":"apiKeys.revoke","summary":"Revoke an API key","description":"Revoke an existing API key","tags":["API Keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications":{"get":{"operationId":"notifications.list","summary":"List notifications for the current user","tags":["Notifications"],"parameters":[{"name":"limit","in":"query","schema":{"type":"number","minimum":1,"maximum":100,"default":20},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"number","minimum":0,"default":0},"allowEmptyValue":true,"allowReserved":true},{"name":"unreadOnly","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/unread-count":{"get":{"operationId":"notifications.unreadCount","summary":"Get unread notification count","tags":["Notifications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/{id}/read":{"put":{"operationId":"notifications.markAsRead","summary":"Mark a notification as read","tags":["Notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/mark-all-read":{"put":{"operationId":"notifications.markAllAsRead","summary":"Mark all notifications as read","tags":["Notifications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/{id}":{"delete":{"operationId":"notifications.delete","summary":"Delete a notification","tags":["Notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/read":{"delete":{"operationId":"notifications.deleteAllRead","summary":"Delete all read notifications","tags":["Notifications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/notifications/preferences":{"get":{"operationId":"notifications.getPreferences","summary":"Get notification preferences","tags":["Notifications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"put":{"operationId":"notifications.updatePreferences","summary":"Update notification preferences","tags":["Notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamInApp":{"type":"boolean"},"teamEmail":{"type":"boolean"},"securityInApp":{"type":"boolean"},"securityEmail":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/sessions":{"get":{"operationId":"sessions.list","summary":"List sessions for the current user","tags":["Sessions"],"parameters":[{"name":"currentSessionToken","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/sessions/{id}":{"delete":{"operationId":"sessions.revoke","summary":"Revoke a specific session","tags":["Sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/sessions/others":{"delete":{"operationId":"sessions.revokeAllOthers","summary":"Revoke all other sessions except current","tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentSessionToken":{"type":"string"}},"required":["currentSessionToken"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/conversations":{"get":{"operationId":"conversations.list","summary":"List shopper conversations by view and filters, with their summaries","tags":["Conversations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"view","in":"query","schema":{"enum":["attention","open","not_found","agent_issues","resolved","all"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["ACTIVE","ESCALATED","RESOLVED","ABANDONED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"intent","in":"query","schema":{"type":"string","minLength":1,"maxLength":40},"allowEmptyValue":true,"allowReserved":true},{"name":"outcome","in":"query","schema":{"enum":["BUILT_BASKET","GOT_ANSWER","NOT_FOUND","NEEDS_FOLLOW_UP","ABANDONED","SPAM"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"complaint","in":"query","schema":{"type":"string","minLength":1,"maxLength":40},"allowEmptyValue":true,"allowReserved":true},{"name":"frustrated","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"basket","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"handoff","in":"query","schema":{"type":"boolean"},"allowEmptyValue":true,"allowReserved":true},{"name":"item","in":"query","schema":{"type":"string","minLength":1,"maxLength":80},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["latest","oldest"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"channel","in":"query","schema":{"enum":["WEB","API","WHATSAPP","MCP","PLAYGROUND"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"via","in":"query","schema":{"enum":["TEXT","VOICE","CALL","IMAGE"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"flag","in":"query","schema":{"type":"string","minLength":1,"maxLength":64},"allowEmptyValue":true,"allowReserved":true},{"name":"language","in":"query","schema":{"type":"string","minLength":1,"maxLength":32},"allowEmptyValue":true,"allowReserved":true},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"shopper","in":"query","schema":{"type":"string","minLength":1,"maxLength":128},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/conversations/facets":{"get":{"operationId":"conversations.facets","summary":"Conversation counts by view, status, intent, outcome, flag, language, channel and store, with the retailer's intent labels","tags":["Conversations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}":{"get":{"operationId":"conversations.get","summary":"Full transcript with tool calls, per-turn cost and latency, basket, and what the conversation was about","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/conversations/heartbeat":{"get":{"operationId":"conversations.heartbeat","summary":"Latest conversation activity timestamp","tags":["Conversations"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/status":{"post":{"operationId":"conversations.setStatus","summary":"Mark a conversation resolved or reopen it","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["RESOLVED","ACTIVE"],"type":"string"}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/reanalyze":{"post":{"operationId":"conversations.reanalyze","summary":"Read the conversation again and refresh its summary and outcome","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/take-over":{"post":{"operationId":"conversations.takeOver","summary":"Pause the agent and assign the conversation to yourself","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/hand-back":{"post":{"operationId":"conversations.handBack","summary":"Hand the conversation back to the agent","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/messages":{"post":{"operationId":"conversations.sendMessage","summary":"Write to the shopper while the agent is paused","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000}},"required":["text"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/assignee":{"post":{"operationId":"conversations.assign","summary":"Assign the conversation to a team member","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assigneeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["assigneeId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/conversations/{conversationId}/send":{"post":{"operationId":"conversations.send","summary":"Send the shopper a WhatsApp message","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"anyOf":[{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","minLength":1,"maxLength":4000}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"products"},"productIds":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"string","minLength":1}},"text":{"type":"string","maxLength":1000}},"required":["kind","productIds"]},{"type":"object","properties":{"kind":{"const":"template"},"templateId":{"type":"string","minLength":1},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"default":{}}},"required":["kind","templateId"]},{"type":"object","properties":{"kind":{"const":"location"},"storeId":{"type":"string","minLength":1}},"required":["kind","storeId"]},{"type":"object","properties":{"kind":{"const":"payment_link"},"orderId":{"type":"string","minLength":1}},"required":["kind","orderId"]},{"type":"object","properties":{"kind":{"const":"photo"},"path":{"type":"string","minLength":1},"caption":{"type":"string","maxLength":1024}},"required":["kind","path"]},{"type":"object","properties":{"kind":{"const":"checkout"}},"required":["kind"]}]}},"required":["message"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string"},"wamids":{"type":"array","items":{"type":"string"}},"costUsd":{"type":"number"}},"required":["messageId","wamids","costUsd"]}}}}}}},"/live/subscribe":{"get":{"operationId":"live.subscribe","summary":"Stream live change events for an organization","tags":["Live"],"parameters":[{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config":{"get":{"operationId":"agentConfig.get","summary":"Live and draft agent configuration, versions, stores and models","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/draft":{"post":{"operationId":"agentConfig.saveDraft","summary":"Save the agent configuration draft","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{},"note":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/publish":{"post":{"operationId":"agentConfig.publish","summary":"Publish a version of the agent configuration","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"note":{"type":"string","maxLength":200}},"required":["version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/draft/discard":{"post":{"operationId":"agentConfig.discardDraft","summary":"Delete the unpublished draft","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/preview":{"post":{"operationId":"agentConfig.previewPrompt","summary":"Render the system prompt for unsaved settings","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/font-upload-url":{"post":{"operationId":"agentConfig.fontUpload.url","summary":"Signed URL to upload a WOFF2 font for the hosted chat","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["size"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/agent-config/font-upload-check":{"post":{"operationId":"agentConfig.fontUpload.check","summary":"Check an uploaded font and store it for the hosted chat","tags":["Agent"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string","pattern":"^[a-z0-9]+$"}},"required":["uploadId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/overview":{"get":{"operationId":"catalog.overview","summary":"Catalog health: coverage of stock, enrichment and embeddings","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/products":{"get":{"operationId":"catalog.products.list","summary":"Browse products with price and stock in one store","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"department","in":"query","schema":{"type":"string","minLength":1,"maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"stock","in":"query","schema":{"enum":["in","out"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"barcode","in":"query","schema":{"enum":["with","without"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","inactive"],"type":"string","default":"active"},"allowEmptyValue":true,"allowReserved":true},{"name":"enrichment","in":"query","schema":{"enum":["missing","overridden","not_embedded"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["title","updated"],"type":"string","default":"title"},"allowEmptyValue":true,"allowReserved":true},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/products/{productId}":{"get":{"operationId":"catalog.products.get","summary":"Source data, enrichment, overrides and offers of one product","tags":["Catalog"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/products/{productId}/overrides":{"post":{"operationId":"catalog.products.setOverrides","summary":"Replace a product's search overrides and reindex it","tags":["Catalog"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"overrides":{"type":"object","properties":{"titleAr":{"type":"string","minLength":1,"maxLength":200},"aliasesAr":{"type":"array","maxItems":40,"items":{"type":"string","minLength":1,"maxLength":80}},"aliasesLatin":{"type":"array","maxItems":40,"items":{"type":"string","minLength":1,"maxLength":80}},"productType":{"type":"string","minLength":1,"maxLength":80},"canonicalIngredient":{"type":"string","minLength":1,"maxLength":80},"brandNormalized":{"type":"string","minLength":1,"maxLength":80}},"additionalProperties":false}},"required":["overrides"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/products/{productId}/content-kinds":{"post":{"operationId":"catalog.products.setContentKinds","summary":"Set or clear an admin's judgement of what a product is","tags":["Catalog"],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kinds":{"anyOf":[{"type":"array","items":{"enum":["alcohol","alcohol_free","pork","tobacco","doubtful","medical","drugs","adult","hazardous","weapons"],"type":"string"}},{"type":"null"}]},"reason":{"type":"string","maxLength":300}},"required":["kinds"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/find":{"get":{"operationId":"catalog.products.find","summary":"Find products by title, brand, barcode or id","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/content-coverage":{"post":{"operationId":"catalog.contentCoverage","summary":"Products judged and hidden for a set of restrictions","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exclude":{"type":"array","items":{"enum":["alcohol","alcohol_free","pork","tobacco"],"type":"string"}},"hideDoubtful":{"type":"boolean"}},"required":["exclude","hideDoubtful"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/sources":{"get":{"operationId":"catalog.sources.list","summary":"Catalog sources, their run history and queued refreshes","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"catalog.sources.create","summary":"Connect a catalog source","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["SHOPIFY","WOOCOMMERCE","JSONL","SUPPY","NOKNOK","TODOORSTEP","SALLA","ZID"],"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4000},"description":"Only the fields to set. Empty values keep what is saved. Never read back.","default":{}},"schedule":{"type":"string","minLength":1,"maxLength":100},"deltaSchedule":{"type":"string","minLength":1,"maxLength":100},"enrichCapUsd":{"type":"number","minimum":0,"maximum":100}},"required":["kind","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}":{"get":{"operationId":"catalog.sources.get","summary":"One catalog source: health, how it is fetched, stores, coverage and spend","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"catalog.sources.update","summary":"Rename, pause, schedule, cap or re-key a catalog source","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"enabled":{"type":"boolean"},"schedule":{"type":"string","minLength":1,"maxLength":100},"deltaSchedule":{"type":"string","minLength":1,"maxLength":100},"enrichCapUsd":{"type":"number","minimum":0,"maximum":100},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4000},"description":"Only the fields to set. Empty values keep what is saved. Never read back."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"delete":{"operationId":"catalog.sources.delete","summary":"Disconnect a source and hide its products from shoppers","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}/runs":{"get":{"operationId":"catalog.sources.runs","summary":"Refresh history of one source, newest first","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"kind","in":"query","schema":{"enum":["SYNC","DELTA","INGEST","ENRICH","EMBED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["FAILED","SUCCEEDED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/sources/test":{"post":{"operationId":"catalog.sources.testConnection","summary":"Try a source's settings and credentials with one cheap call","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1},"kind":{"enum":["SHOPIFY","WOOCOMMERCE","JSONL","SUPPY","NOKNOK","TODOORSTEP","SALLA","ZID"],"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4000},"description":"Only the fields to set. Empty values keep what is saved. Never read back."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}/webhook-secret":{"post":{"operationId":"catalog.sources.rotateWebhookSecret","summary":"Issue a new webhook secret (shown once)","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}/confirm-install":{"post":{"operationId":"catalog.sources.confirmInstall","summary":"Platform admins: bind the app install waiting for this source's store to it","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}/run":{"post":{"operationId":"catalog.sources.runNow","summary":"Queue a sync, enrichment and embedding refresh","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"enum":["full","delta"],"type":"string","default":"full"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/sources/{sourceId}/cancel":{"post":{"operationId":"catalog.sources.cancel","summary":"Cancel the waiting or running refresh of a source","tags":["Catalog"],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/catalog/runs/{runId}/errors":{"get":{"operationId":"catalog.sources.runErrors","summary":"A run with the lines or items it skipped, and why","tags":["Catalog"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/search":{"post":{"operationId":"catalog.search.test","summary":"Run hybrid search and show why each result ranked where it did","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","minLength":1},"query":{"type":"string","minLength":1,"maxLength":200},"department":{"type":"string","minLength":1,"maxLength":120},"maxPrice":{"type":"number","exclusiveMinimum":0},"inStockOnly":{"type":"boolean","default":false},"k":{"type":"integer","minimum":1,"maximum":50,"default":20}},"required":["query"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/search/explain":{"post":{"operationId":"catalog.search.explain","summary":"Explain where one product lands for a query, and why","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","minLength":1},"query":{"type":"string","minLength":1,"maxLength":200},"department":{"type":"string","minLength":1,"maxLength":120},"productId":{"type":"string","minLength":1}},"required":["query","productId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/catalog/meta":{"get":{"operationId":"catalog.meta.get","summary":"The Meta catalog and its sync","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"enum":["setting_up","syncing","ready","paused","failed"],"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outOfStock":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","live","rejected","pending","outOfStock"]},"byStore":{"type":"array","items":{"type":"object","properties":{"storeId":{"type":"string"},"name":{"type":"string"},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["storeId","name","live","rejected"]}},"lastFullAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastDeltaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"signupCatalogIds":{"type":"array","items":{"type":"string"}}},"required":["configured","catalogId","name","status","stats","byStore","lastFullAt","lastDeltaAt","error","signupCatalogIds"]}}}}}},"post":{"operationId":"catalog.meta.setup","summary":"Create the Meta catalog, or use one the retailer has, and connect it","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"existingCatalogId":{"type":"string","minLength":1},"storeScope":{"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"enum":["setting_up","syncing","ready","paused","failed"],"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outOfStock":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","live","rejected","pending","outOfStock"]},"byStore":{"type":"array","items":{"type":"object","properties":{"storeId":{"type":"string"},"name":{"type":"string"},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["storeId","name","live","rejected"]}},"lastFullAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastDeltaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"signupCatalogIds":{"type":"array","items":{"type":"string"}}},"required":["configured","catalogId","name","status","stats","byStore","lastFullAt","lastDeltaAt","error","signupCatalogIds"]}}}}}}},"/organizations/{organizationId}/catalog/meta/sync":{"post":{"operationId":"catalog.meta.sync","summary":"Sync now (a dry run counts what would change)","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"full":{"type":"boolean","default":false},"dryRun":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"upserts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["runId","upserts","deletes","unchanged"]}}}}}}},"/organizations/{organizationId}/catalog/meta/items":{"get":{"operationId":"catalog.meta.items","summary":"Items sent to Meta, rejected first","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"state","in":"query","schema":{"enum":["pending","sent","live","rejected","deleted"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"retailerId":{"type":"string"},"productId":{"type":"string"},"title":{"type":"string"},"storeId":{"type":"string"},"state":{"type":"string"},"errors":{},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["retailerId","productId","title","storeId","state","sentAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}}}}},"/organizations/{organizationId}/catalog/meta/pause":{"post":{"operationId":"catalog.meta.pause","summary":"Stop syncing to Meta","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"enum":["setting_up","syncing","ready","paused","failed"],"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outOfStock":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","live","rejected","pending","outOfStock"]},"byStore":{"type":"array","items":{"type":"object","properties":{"storeId":{"type":"string"},"name":{"type":"string"},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["storeId","name","live","rejected"]}},"lastFullAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastDeltaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"signupCatalogIds":{"type":"array","items":{"type":"string"}}},"required":["configured","catalogId","name","status","stats","byStore","lastFullAt","lastDeltaAt","error","signupCatalogIds"]}}}}}}},"/organizations/{organizationId}/catalog/meta/resume":{"post":{"operationId":"catalog.meta.resume","summary":"Sync to Meta again","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"enum":["setting_up","syncing","ready","paused","failed"],"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outOfStock":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","live","rejected","pending","outOfStock"]},"byStore":{"type":"array","items":{"type":"object","properties":{"storeId":{"type":"string"},"name":{"type":"string"},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["storeId","name","live","rejected"]}},"lastFullAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastDeltaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"signupCatalogIds":{"type":"array","items":{"type":"string"}}},"required":["configured","catalogId","name","status","stats","byStore","lastFullAt","lastDeltaAt","error","signupCatalogIds"]}}}}}}},"/organizations/{organizationId}/catalog/meta/retry-rejected":{"post":{"operationId":"catalog.meta.retryRejected","summary":"Send rejected items again","tags":["Catalog"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"enum":["setting_up","syncing","ready","paused","failed"],"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outOfStock":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","live","rejected","pending","outOfStock"]},"byStore":{"type":"array","items":{"type":"object","properties":{"storeId":{"type":"string"},"name":{"type":"string"},"live":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["storeId","name","live","rejected"]}},"lastFullAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastDeltaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"signupCatalogIds":{"type":"array","items":{"type":"string"}}},"required":["configured","catalogId","name","status","stats","byStore","lastFullAt","lastDeltaAt","error","signupCatalogIds"]}}}}}}},"/organizations/{organizationId}/insights":{"get":{"operationId":"insights.overview","summary":"Conversations, baskets, searches, cost and speed for a window","tags":["Insights"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"days","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/retailers":{"get":{"operationId":"platform.retailers.list","summary":"All retailers with usage and cost over the last 30 days","tags":["Platform"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"platform.retailers.create","summary":"Create a retailer and invite its first admin","tags":["Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"slug":{"type":"string","pattern":"^[a-z0-9-]{2,40}$"},"adminEmail":{"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"}},"required":["name","adminEmail"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/retailers/{organizationId}/invitations":{"post":{"operationId":"platform.retailers.invite","summary":"Invite (or re-invite) an admin to a retailer","tags":["Platform"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},"role":{"enum":["owner","admin","member"],"type":"string","default":"admin"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/retailers/{organizationId}/watch-visitors":{"post":{"operationId":"platform.retailers.watchVisitors","summary":"Alert on every new visitor to a retailer's hosted chat","tags":["Platform"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"watch":{"type":"boolean"}},"required":["watch"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/retailers/{organizationId}/permissions":{"post":{"operationId":"platform.retailers.permissions","summary":"Allow or forbid a retailer to hide Powered by Hephon","tags":["Platform"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowHidePoweredBy":{"type":"boolean"}},"required":["allowHidePoweredBy"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/visitors":{"get":{"operationId":"platform.visitors.list","summary":"Hosted-chat visitors per retailer, grouped by address","tags":["Platform"],"parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":14},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners":{"get":{"operationId":"platform.partners.list","summary":"Partners with their staff, retailers and spend this month","tags":["Platform"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"platform.partners.create","summary":"Create a partner","tags":["Platform"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"slug":{"type":"string","minLength":2,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners/{id}":{"patch":{"operationId":"platform.partners.update","summary":"Rename a partner","tags":["Platform"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners/{partnerId}/members":{"post":{"operationId":"platform.partners.members.add","summary":"Add someone to a partner's staff","tags":["Platform"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"},"role":{"enum":["owner","admin","member"],"type":"string","default":"admin"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners/{partnerId}/members/{id}":{"delete":{"operationId":"platform.partners.members.remove","summary":"Remove someone from a partner's staff","tags":["Platform"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners/{partnerId}/organizations":{"post":{"operationId":"platform.partners.attachOrganization","summary":"Put an existing retailer under a partner","tags":["Platform"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","minLength":1},"externalRef":{"type":"string","minLength":1,"maxLength":100}},"required":["organizationId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/partners/{partnerId}/organizations/{organizationId}":{"delete":{"operationId":"platform.partners.detachOrganization","summary":"Take a retailer out of a partner","tags":["Platform"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/usage":{"get":{"operationId":"platform.usage","summary":"Spend this month by retailer and kind","tags":["Platform"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/platform/whatsapp/setup":{"get":{"operationId":"platform.whatsapp.setup","summary":"Is Hephon's Meta app ready for WhatsApp","tags":["Platform"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"ok":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","ok","detail"]}},"missingFields":{"type":"array","items":{"type":"string"}}},"required":["checks","missingFields"]}}}}}}},"/platform/whatsapp/accounts":{"get":{"operationId":"platform.whatsapp.accounts","summary":"Every retailer's Messaging accounts and numbers","tags":["Platform"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"wabaId":{"type":"string"},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarding":{"type":"string"},"numbers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokenScopes":{"type":"array","items":{"type":"string"}},"tokenExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","wabaId","organization","name","onboarding","numbers","openAlerts","tokenScopes","tokenExpiresAt","checkedAt"]}}},"required":["accounts"]}}}}}}},"/organizations/{organizationId}/evals":{"get":{"operationId":"evals.overview","summary":"Bench cases per suite, recent runs and what a new run can use","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/evals/cases":{"get":{"operationId":"evals.cases.list","summary":"Every bench case of a retailer with its turns and checks","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"evals.cases.save","summary":"Create or update a hand-written case","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"caseId":{"type":"string","minLength":1},"suite":{"enum":["COVERAGE","BASKET","LANGUAGE","SAFETY","WHATSAPP"],"type":"string"},"title":{"type":"string","minLength":3,"maxLength":200},"turns":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"input":{"anyOf":[{"type":"object","properties":{"kind":{"const":"text"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"location"},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["kind","latitude","longitude"]},{"type":"object","properties":{"kind":{"const":"cart"},"items":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1,"maximum":99}},"required":["productId","quantity"]}}},"required":["kind","items"]},{"type":"object","properties":{"kind":{"const":"reply"},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"const":"context"},"productIds":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","minLength":1}}},"required":["kind","productIds"]},{"type":"object","properties":{"kind":{"const":"image"},"reading":{"type":"string","minLength":1,"maxLength":500}},"required":["kind","reading"]},{"type":"object","properties":{"kind":{"const":"flow"},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","response"]},{"type":"object","properties":{"kind":{"const":"referral"},"headline":{"type":"string","maxLength":200},"productIds":{"type":"array","maxItems":10,"items":{"type":"string"},"default":[]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"keypad"},"digit":{"type":"string","pattern":"^[0-9*#]$"}},"required":["kind","digit"]}]},"surface":{"enum":["WEB","WHATSAPP","CALL","WHATSAPP_CALL"],"type":"string"},"unlocated":{"type":"boolean"},"expect":{"type":"object","properties":{"searched":{"type":"boolean"},"toolsCalled":{"type":"array","items":{"enum":["search_products","get_product","find_ingredients","add_to_basket","update_basket","set_substitution","clear_basket","get_basket","get_order_status","escalate_to_human","set_store","set_marketing_consent","start_checkout","reorder","cancel_order","report_order_issue","end_call"],"type":"string"}},"noTools":{"type":"boolean"},"shows":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"},"default":[]},"productTypes":{"type":"array","items":{"type":"string"},"default":[]},"departments":{"type":"array","items":{"type":"string"},"default":[]},"label":{"type":"string","maxLength":120}},"required":["label"]},"showsEach":{"type":"array","maxItems":6,"items":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"},"default":[]},"productTypes":{"type":"array","items":{"type":"string"},"default":[]},"departments":{"type":"array","items":{"type":"string"},"default":[]},"label":{"type":"string","maxLength":120}},"required":["label"]}},"showsNew":{"type":"boolean"},"onSale":{"type":"boolean"},"hides":{"type":"object","properties":{"productIds":{"type":"array","minItems":1,"items":{"type":"string"}},"label":{"type":"string","maxLength":160}},"required":["productIds","label"]},"maxPrice":{"type":"number","exclusiveMinimum":0},"noneOver":{"type":"number","exclusiveMinimum":0},"listBudget":{"type":"number","exclusiveMinimum":0},"recipeQuantities":{"type":"boolean"},"basket":{"type":"object","properties":{"contains":{"type":"array","items":{"type":"object","properties":{"productIds":{"type":"array","minItems":1,"items":{"type":"string"}},"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"label":{"type":"string","maxLength":160}},"required":["productIds","label"]},"default":[]},"excludes":{"type":"array","items":{"type":"object","properties":{"productIds":{"type":"array","minItems":1,"items":{"type":"string"}},"label":{"type":"string","maxLength":160}},"required":["productIds","label"]},"default":[]},"empty":{"type":"boolean"},"minLines":{"type":"integer","minimum":1,"maximum":9007199254740991},"fromShown":{"type":"boolean"},"unchanged":{"type":"boolean"}}},"whatsapp":{"type":"object","properties":{"messageKind":{"type":"array","minItems":1,"items":{"type":"string","minLength":1}},"noInteractive":{"type":"boolean"},"sectionsPerItem":{"type":"integer","minimum":1,"maximum":10},"idsResolve":{"type":"boolean"},"maxMessages":{"type":"integer","minimum":1,"maximum":2},"withinLimits":{"type":"boolean"},"noOrderUnlessConfirmed":{"type":"boolean"},"orderPlaced":{"type":"boolean"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoteMatches":{"type":"boolean"},"restrictionsHold":{"type":"boolean"},"personReachable":{"type":"boolean"},"privacyLine":{"type":"boolean"},"showsOnly":{"type":"array","minItems":1,"items":{"type":"string"}}}},"pricesFromCatalog":{"type":"boolean"},"injectedPrice":{"type":"number","minimum":0},"noPromptEcho":{"type":"boolean"},"noRefusal":{"type":"boolean"},"script":{"enum":["arabic","latin"],"type":"string"},"textExcludes":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":300},"flags":{"type":"string","maxLength":4,"default":"i"},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["pattern","label"]},"default":[]},"recipeExcludes":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":300},"flags":{"type":"string","maxLength":4,"default":"i"},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["pattern","label"]},"default":[]},"textMatches":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":300},"flags":{"type":"string","maxLength":4,"default":"i"},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["pattern","label"]},"default":[]},"maxChars":{"type":"integer","minimum":20,"maximum":9007199254740991},"rank":{"type":"object","properties":{"productIds":{"type":"array","minItems":1,"items":{"type":"string"}},"alsoAccept":{"type":"array","items":{"type":"string"},"default":[]},"within":{"type":"integer","minimum":1,"maximum":50,"default":8},"label":{"type":"string","maxLength":200}},"required":["productIds","label"]}},"default":{}}},"required":["text"]}}},"required":["suite","title","turns"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/evals/cases/generate":{"post":{"operationId":"evals.cases.generate","summary":"Build cases from the catalog: add new targets, drop vanished ones (or rebuild all)","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"rebuild":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/evals/cases/{caseId}/enabled":{"post":{"operationId":"evals.cases.setEnabled","summary":"Include or leave out a case in future runs","tags":["Evals"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/evals/cases/{caseId}":{"delete":{"operationId":"evals.cases.delete","summary":"Delete a hand-written case (past results keep their copy)","tags":["Evals"],"parameters":[{"name":"caseId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/evals/runs/estimate":{"post":{"operationId":"evals.runs.estimate","summary":"How many cases a run covers and roughly what it costs","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"enum":["published","draft"],"type":"string"},"model":{"type":"string","minLength":1,"maxLength":120},"suites":{"type":"array","minItems":1,"items":{"enum":["COVERAGE","RETRIEVAL","BASKET","LANGUAGE","SAFETY","WHATSAPP"],"type":"string"}},"trials":{"type":"integer","minimum":1,"maximum":3,"default":1}},"required":["source","suites"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/evals/runs":{"post":{"operationId":"evals.runs.create","summary":"Start a bench run","tags":["Evals"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"enum":["published","draft"],"type":"string"},"model":{"type":"string","minLength":1,"maxLength":120},"suites":{"type":"array","minItems":1,"items":{"enum":["COVERAGE","RETRIEVAL","BASKET","LANGUAGE","SAFETY","WHATSAPP"],"type":"string"}},"trials":{"type":"integer","minimum":1,"maximum":3,"default":1},"costCapUsd":{"type":"number","maximum":50,"exclusiveMinimum":0}},"required":["source","suites","costCapUsd"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/evals/runs/{runId}":{"get":{"operationId":"evals.runs.get","summary":"A run with every result, its checks and turn summaries","tags":["Evals"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"delete":{"operationId":"evals.runs.delete","summary":"Delete a run, its results and its bench conversations","tags":["Evals"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/evals/runs/{runId}/cancel":{"post":{"operationId":"evals.runs.cancel","summary":"Stop a run after the cases already in flight","tags":["Evals"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/evals/runs/{runId}/resume":{"post":{"operationId":"evals.runs.resume","summary":"Continue an interrupted, cancelled or capped run","tags":["Evals"],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"costCapUsd":{"type":"number","maximum":50,"exclusiveMinimum":0}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/webhooks/endpoints":{"get":{"operationId":"webhooks.endpoints.list","summary":"Webhook endpoints with their health and last delivery","tags":["Webhooks"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"webhooks.endpoints.create","summary":"Add a webhook endpoint; its signing secret is returned once","tags":["Webhooks"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"eventTypes":{"type":"array","maxItems":14,"items":{"enum":["cart.item_added","cart.item_updated","cart.item_removed","cart.cleared","cart.checkout_requested","conversation.handoff_requested","conversation.handoff_released","conversation.message","order.attributed","order.placed","order.status_changed","order.updated","order.issue_reported","shopper.data_deleted"],"type":"string"},"default":[]}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/endpoints/{id}":{"patch":{"operationId":"webhooks.endpoints.update","summary":"Change a webhook endpoint's URL, description or events","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"eventTypes":{"type":"array","maxItems":14,"items":{"enum":["cart.item_added","cart.item_updated","cart.item_removed","cart.cleared","cart.checkout_requested","conversation.handoff_requested","conversation.handoff_released","conversation.message","order.attributed","order.placed","order.status_changed","order.updated","order.issue_reported","shopper.data_deleted"],"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"delete":{"operationId":"webhooks.endpoints.delete","summary":"Delete a webhook endpoint and its delivery log","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/endpoints/{id}/enabled":{"post":{"operationId":"webhooks.endpoints.setEnabled","summary":"Turn a webhook endpoint on or off","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/endpoints/{id}/rotate-secret":{"post":{"operationId":"webhooks.endpoints.rotateSecret","summary":"Issue a new signing secret; the old one keeps signing for 24 hours","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/endpoints/{id}/test":{"post":{"operationId":"webhooks.endpoints.sendTest","summary":"Send a webhook.test event to one endpoint","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/webhooks/deliveries":{"get":{"operationId":"webhooks.deliveries.list","summary":"Webhook delivery log, newest first","tags":["Webhooks"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"endpointId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["succeeded","retrying","dead","cancelled"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/deliveries/{id}":{"get":{"operationId":"webhooks.deliveries.get","summary":"One delivery: payload and every attempt","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/webhooks/deliveries/{id}/resend":{"post":{"operationId":"webhooks.deliveries.resend","summary":"Send a finished delivery again, with a fresh retry budget","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/embed-settings":{"get":{"operationId":"embedSettings.get","summary":"Allowed origins and whether shoppers need a launch token","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"patch":{"operationId":"embedSettings.update","summary":"Change allowed origins or the launch token requirement","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedOrigins":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":300}},"requireLaunchToken":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/embed-settings/install-status":{"get":{"operationId":"embedSettings.installStatus","summary":"SDK versions and the widget seen opening chats in the last 30 days","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/launch-keys":{"get":{"operationId":"embedSettings.launchKeys.list","summary":"Public keys your app signs launch tokens with","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"embedSettings.launchKeys.create","summary":"Add an Ed25519 public key (JWK) for launch tokens","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"kid":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9._:-]+$"},"publicJwk":{}},"required":["name","kid"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/launch-keys/{id}/revoke":{"post":{"operationId":"embedSettings.launchKeys.revoke","summary":"Stop accepting launch tokens signed with this key","tags":["Embed"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/embed-test/targets":{"get":{"operationId":"embedSettings.test.targets","summary":"Retailers and stores you can open in the embed test host","tags":["Embed"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/embed-test/launch":{"post":{"operationId":"embedSettings.test.launch","summary":"Open a test shopper session and get a one-time launch code","tags":["Embed"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","minLength":1,"maxLength":200},"shopperId":{"type":"string","minLength":1,"maxLength":128},"hostSessionId":{"type":"string","minLength":1,"maxLength":200},"locale":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"embed":{"enum":["flutter","react-native","ios","android","iframe","widget"],"type":"string","default":"iframe"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/usage":{"get":{"operationId":"usage.summary","summary":"This month's spend, cap and spend by kind","tags":["Usage"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string"},"monthToDateUsd":{"type":"number"},"projectedUsd":{"type":"number"},"capUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"ratio":{"type":"number"},"blocked":{"type":"boolean"},"spendAlertPct":{"type":"number"},"spendCapAction":{"enum":["ALERT","BLOCK"],"type":"string"},"byKind":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["TURN","RELEVANCE","CLASSIFIER","ANALYSIS","ENRICH","EMBED","STT","TTS","WHATSAPP","EVAL"],"type":"string"},"costUsd":{"type":"number"},"units":{"type":"number"},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","costUsd","units","events"]}},"whatsapp":{"anyOf":[{"type":"object","properties":{"estimated":{"const":true},"costUsd":{"type":"number"},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costUsd":{"type":"number"}},"required":["category","messages","costUsd"]}},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"freeServiceLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["estimated","costUsd","messages","byCategory","freeServiceUsed","freeServiceLimit"]},{"type":"null"}]}},"required":["month","monthToDateUsd","projectedUsd","capUsd","ratio","blocked","spendAlertPct","spendCapAction","byKind","whatsapp"]}}}}}}},"/organizations/{organizationId}/usage/daily":{"get":{"operationId":"usage.daily","summary":"Spend per UTC day and kind","tags":["Usage"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date","description":"First UTC day, YYYY-MM-DD (default: 30 days before `to`)"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","format":"date","description":"Last UTC day, YYYY-MM-DD, included (default: today)"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/usage/export":{"get":{"operationId":"usage.export","summary":"Spend per UTC day and kind as CSV","tags":["Usage"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"from","in":"query","schema":{"type":"string","format":"date","description":"First UTC day, YYYY-MM-DD (default: 30 days before `to`)"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","format":"date","description":"Last UTC day, YYYY-MM-DD, included (default: today)"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","contentMediaType":"*/*"}}}}}}},"/organizations/{organizationId}/usage/status":{"get":{"operationId":"usage.status","summary":"Whether the monthly spend cap is blocking shopper chats","tags":["Usage"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/usage/cap":{"patch":{"operationId":"usage.updateCap","summary":"Set the monthly spend cap, when admins are told, and what happens at the cap","tags":["Usage"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlySpendCapUsd":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000,"multipleOf":0.01},{"type":"null"}]},"spendAlertPct":{"type":"integer","minimum":1,"maximum":100},"spendCapAction":{"enum":["ALERT","BLOCK"],"type":"string"}},"required":["monthlySpendCapUsd","spendAlertPct","spendCapAction"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers":{"get":{"operationId":"channels.whatsapp.list","summary":"WhatsApp numbers and Messaging accounts, with health and cost","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt"]}},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"wabaId":{"type":"string"},"waacId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"businessVerification":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"onboarding":{"type":"string"},"paymentMethodMissing":{"type":"boolean"},"tokenExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"numbers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","wabaId","waacId","name","currency","businessVerification","reviewStatus","onboarding","paymentMethodMissing","tokenExpiresAt","numbers"]}},"webhook":{"type":"object","properties":{"ready":{"type":"boolean"}},"required":["ready"]}},"required":["numbers","accounts","webhook"]}}}}}},"post":{"operationId":"channels.whatsapp.connectManual","summary":"Connect a number with its ids and a system user token","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":"string","pattern":"^\\d{6,20}$"},"wabaId":{"type":"string","pattern":"^\\d{6,20}$"},"accessToken":{"type":"string","minLength":20,"maxLength":1024},"label":{"type":"string","maxLength":60},"storeScope":{"type":"array","items":{"type":"string","minLength":1},"default":[]},"defaultStoreExternalId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"default":null}},"required":["phoneNumberId","wabaId","accessToken"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}":{"get":{"operationId":"channels.whatsapp.get","summary":"One WhatsApp number: health, profile, automation, calling, checklist","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}},"patch":{"operationId":"channels.whatsapp.update","summary":"Label, branches served, default branch, answering on or off","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string","minLength":1}},"defaultStoreExternalId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"enabled":{"type":"boolean"},"testRecipients":{"type":"array","maxItems":10,"items":{"type":"string"}},"accessToken":{"type":"string","minLength":20,"maxLength":1024}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}},"delete":{"operationId":"channels.whatsapp.disconnect","summary":"Disconnect a number and forget its settings","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"disconnected":{"const":true}},"required":["disconnected"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/refresh":{"post":{"operationId":"channels.whatsapp.refresh","summary":"Read the number and its account from Meta again","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/signup":{"get":{"operationId":"channels.whatsapp.signupConfig","summary":"What the page needs to open Embedded Signup","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"anyOf":[{"type":"string"},{"type":"null"}]},"configId":{"anyOf":[{"type":"string"},{"type":"null"}]},"graphVersion":{"type":"string"},"ready":{"type":"boolean"}},"required":["appId","configId","graphVersion","ready"]}}}}}},"post":{"operationId":"channels.whatsapp.completeSignup","summary":"Finish Embedded Signup and connect the number","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":2048},"session":{"type":"object","properties":{"phoneNumberId":{"type":"string","pattern":"^\\d{6,20}$"},"messagingAccountIds":{"type":"array","items":{"type":"string"},"default":[]},"primaryWaacIds":{"type":"array","items":{"type":"string"},"default":[]},"catalogIds":{"type":"array","items":{"type":"string"},"default":[]},"isOnBizApp":{"type":"boolean","default":false},"businessId":{"type":"string"}},"required":["phoneNumberId"]},"label":{"type":"string","maxLength":60}},"required":["code","session"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/signup/events":{"post":{"operationId":"channels.whatsapp.logSignupEvent","summary":"Record a cancelled or failed signup step","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"enum":["FINISH","CANCEL","ERROR"],"type":"string"},"currentStep":{"type":"string","maxLength":100},"errorMessage":{"type":"string","maxLength":1000},"errorId":{"type":"string","maxLength":100},"sessionId":{"type":"string","maxLength":200}},"required":["event"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"const":true}},"required":["recorded"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/profile":{"put":{"operationId":"channels.whatsapp.saveProfile","summary":"Save the number's business profile","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}}},"required":["profile"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/display-name":{"post":{"operationId":"channels.whatsapp.requestDisplayName","summary":"Ask Meta to approve a new display name","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":512}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"changesLeft":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["nameStatus","changesLeft"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/display-name/register":{"post":{"operationId":"channels.whatsapp.registerDisplayName","summary":"Register the number again to show its approved display name","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"pin":{"type":"string","pattern":"^\\d{6}$"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneNumberId":{"type":"string"},"displayPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"storeScope":{"type":"array","items":{"type":"string"}},"defaultStoreExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"health":{"enum":["connected","attention","flagged","restricted","disconnected","unknown"],"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"qualityRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"messagingLimit":{"anyOf":[{"type":"string"},{"type":"null"}]},"nameStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"callingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isOnBizApp":{"type":"boolean"},"costThisMonthUsd":{"type":"number"},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openAlerts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"throughput":{"anyOf":[{"type":"string"},{"type":"null"}]},"officialBusiness":{"anyOf":[{"type":"string"},{"type":"null"}]},"platformType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sipStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"verifiedName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedName":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"}},"required":["name","status"]},{"type":"null"}]},"registerPinSaved":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"about":{"type":"string","maxLength":139},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","maxLength":128,"format":"email"},"websites":{"type":"array","maxItems":2,"items":{"type":"string","format":"uri"}},"vertical":{"type":"string"},"photoHandle":{"type":"string"}}},{"type":"null"}]},"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]},"calling":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},{"type":"null"}]},"commerce":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"type":"boolean"}},"required":["cartEnabled","catalogVisible"]},"testRecipients":{"type":"array","items":{"type":"string"}},"entryLinks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]}},"devOverride":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"setAt":{"type":"string"},"by":{"type":"string"}},"required":["host","setAt","by"]},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","done","detail"]}}},"required":["id","label","phoneNumberId","displayPhone","wabaId","whatsappAccountId","storeScope","defaultStoreExternalId","enabled","health","status","qualityRating","messagingLimit","nameStatus","callingStatus","isOnBizApp","costThisMonthUsd","freeServiceUsed","openAlerts","lastError","checkedAt","throughput","officialBusiness","platformType","sipStatus","verifiedName","requestedName","registerPinSaved","profile","automation","calling","commerce","testRecipients","entryLinks","devOverride","checklist"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/automation":{"put":{"operationId":"channels.whatsapp.saveAutomation","summary":"Save the number's ice breakers and commands","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]}},"required":["automation"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"iceBreakers":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":80}},"commands":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"name":{"type":"string","maxLength":32,"pattern":"^[a-z0-9_]+$"},"hint":{"type":"string","minLength":1,"maxLength":256}},"required":["name","hint"]}}},"required":["iceBreakers","commands"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/commerce":{"put":{"operationId":"channels.whatsapp.saveCommerce","summary":"Turn WhatsApp's cart on or off for the number","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cartEnabled":{"type":"boolean"}},"required":["cartEnabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cartEnabled":{"type":"boolean"},"catalogVisible":{"const":false}},"required":["cartEnabled","catalogVisible"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/costs":{"get":{"operationId":"channels.whatsapp.costs","summary":"Estimated Meta cost by category, free service messages used","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"month","in":"query","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string"},"estimated":{"const":true},"totalUsd":{"type":"number"},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costUsd":{"type":"number"}},"required":["category","messages","costUsd"]}},"freeServiceUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"freeServiceLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"perConversationUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"perOrderUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"reconciledUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["month","estimated","totalUsd","byCategory","freeServiceUsed","freeServiceLimit","perConversationUsd","perOrderUsd","reconciledUsd"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/alerts":{"get":{"operationId":"channels.whatsapp.alerts.list","summary":"Open WhatsApp alerts, most severe first","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"includeResolved","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"enum":["CRITICAL","WARNING","INFO"],"type":"string"},"title":{"type":"string"},"detail":{},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"logId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string","format":"date-time","x-native-type":"date"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","code","severity","title","connectionId","wabaId","logId","openedAt","resolvedAt"]}}},"required":["alerts"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/alerts/{alertId}/dismiss":{"post":{"operationId":"channels.whatsapp.alerts.dismiss","summary":"Dismiss an alert (it opens again if the problem comes back)","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"alertId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"enum":["CRITICAL","WARNING","INFO"],"type":"string"},"title":{"type":"string"},"detail":{},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"wabaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"logId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"type":"string","format":"date-time","x-native-type":"date"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","code","severity","title","connectionId","wabaId","logId","openedAt","resolvedAt"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/content-check":{"get":{"operationId":"channels.whatsapp.contentCheck.status","summary":"Products checked for WhatsApp, and the cost of checking the rest","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"judged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"complete":{"type":"boolean"},"estimateUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"runningRunId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["judged","total","complete","estimateUsd","runningRunId"]}}}}}},"post":{"operationId":"channels.whatsapp.contentCheck.start","summary":"Check the products not judged yet","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmedEstimateUsd":{"type":"number","minimum":0}},"required":["confirmedEstimateUsd"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/entry-links":{"get":{"operationId":"channels.whatsapp.entryLinks.list","summary":"The number's wa.me links","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"allOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}]}}},"required":["links"]}}}}}},"put":{"operationId":"channels.whatsapp.entryLinks.save","summary":"Add or change a wa.me link (a new code when none is given)","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"link":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":480}},"required":["label","prefill"]}]}},"required":["link"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z2-7]{4,8}$"},"label":{"type":"string","minLength":1,"maxLength":60},"storeExternalId":{"type":"string","minLength":1},"prefill":{"type":"boolean"},"text":{"type":"string","maxLength":500}},"required":["code","label","prefill"]},{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/entry-links/{code}":{"delete":{"operationId":"channels.whatsapp.entryLinks.delete","summary":"Remove a wa.me link","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"code","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/preview":{"post":{"operationId":"channels.whatsapp.preview.render","summary":"Render a reply as WhatsApp would show it","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"source":{"anyOf":[{"type":"object","properties":{"replyId":{"type":"string","minLength":1}},"required":["replyId"]},{"type":"object","properties":{"sample":{"enum":["search","list","single","recipe","basket","location","branch","contact","handoff","checkout","order_update"],"type":"string"}},"required":["sample"]}]},"settings":{}},"required":["source"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"view":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{},"summary":{"type":"string"}},"required":["kind","view","summary"]}},"summary":{"type":"string"},"products":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"productId":{"type":"string"},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["productId","title","imageUrl","price","currency"]}}},"required":["messages","summary","products"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/preview/send":{"post":{"operationId":"channels.whatsapp.preview.send","summary":"Send a rendered reply to a tester","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"source":{"anyOf":[{"type":"object","properties":{"replyId":{"type":"string","minLength":1}},"required":["replyId"]},{"type":"object","properties":{"sample":{"enum":["search","list","single","recipe","basket","location","branch","contact","handoff","checkout","order_update"],"type":"string"}},"required":["sample"]}]},"settings":{},"to":{"type":"string"}},"required":["connectionId","source","to"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"wamids":{"type":"array","items":{"type":"string"}}},"required":["wamids"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/checkout-flow":{"get":{"operationId":"channels.whatsapp.checkoutFlow.status","summary":"The checkout form's status and health","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"flowId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"keySignature":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"p90Ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"errorRate":{"anyOf":[{"type":"number"},{"type":"null"}]},"alert":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["p90Ms","errorRate","alert"]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["configured","flowId","status","publishedAt","keySignature","endpointUrl","health","previewUrl"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/checkout-flow/setup":{"post":{"operationId":"channels.whatsapp.checkoutFlow.setup","summary":"Create the checkout form and its endpoint key","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"flowId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"keySignature":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"p90Ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"errorRate":{"anyOf":[{"type":"number"},{"type":"null"}]},"alert":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["p90Ms","errorRate","alert"]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["configured","flowId","status","publishedAt","keySignature","endpointUrl","health","previewUrl"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/checkout-flow/publish":{"post":{"operationId":"channels.whatsapp.checkoutFlow.publish","summary":"Publish the checkout form again","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"flowId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"keySignature":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"health":{"type":"object","properties":{"p90Ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"errorRate":{"anyOf":[{"type":"number"},{"type":"null"}]},"alert":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["p90Ms","errorRate","alert"]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["configured","flowId","status","publishedAt","keySignature","endpointUrl","health","previewUrl"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/checkout-flow/preview":{"post":{"operationId":"channels.whatsapp.checkoutFlow.preview","summary":"Meta's preview link of the checkout form","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"previewUrl":{"type":"string","format":"uri"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["previewUrl","expiresAt"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/checkout-flow/ping":{"post":{"operationId":"channels.whatsapp.checkoutFlow.ping","summary":"Send the endpoint an encrypted health check","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"ms":{"type":"number"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","ms","error"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/calling":{"get":{"operationId":"channels.whatsapp.calling.get","summary":"Calling settings and what calling needs first","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calling":{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},"prerequisites":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"}},"required":["key","label","done"]}},"clientRefreshDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calling","prerequisites","clientRefreshDays"]}}}}}},"put":{"operationId":"channels.whatsapp.calling.update","summary":"Save calling settings to Meta","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calling":{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]}},"required":["calling"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calling":{"type":"object","properties":{"enabled":{"type":"boolean"},"callButton":{"enum":["show","hide"],"type":"string"},"buttonCountries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"hours":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1},"weekly":{"type":"array","items":{"type":"object","properties":{"day":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"open":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"close":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["day","open","close"]}},"holidays":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3])[0-5]\\d$"}},"required":["date","start","end"]}}},"required":["enabled","timezone","weekly","holidays"]},"callbackPermission":{"type":"boolean"},"voicemail":{"type":"object","properties":{"enabled":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":0,"maximum":30},"announcementMediaId":{"type":"string"}},"required":["enabled","timeoutSeconds"]},"maxConcurrent":{"type":"integer","minimum":1,"maximum":20,"default":3},"maxMinutes":{"type":"integer","minimum":1,"maximum":60,"default":10},"meta":{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"callIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sip":{"anyOf":[{"type":"string"},{"type":"null"}]},"restrictions":{"type":"array","items":{"type":"string"}},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"changedOutside":{"type":"boolean"}},"required":["status","callIcon","sip","restrictions","syncedAt"]}},"required":["enabled","callButton","buttonCountries","hours","callbackPermission","voicemail"]},"prerequisites":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"done":{"type":"boolean"}},"required":["key","label","done"]}},"clientRefreshDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calling","prerequisites","clientRefreshDays"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/calling/test-button":{"post":{"operationId":"channels.whatsapp.calling.sendTestButton","summary":"Send a tester a call button","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}},"required":["to"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"wamid":{"type":"string"}},"required":["wamid"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/numbers/{connectionId}/calling/voicemail-greeting":{"post":{"operationId":"channels.whatsapp.calling.voicemailGreeting","summary":"Record the voicemail greeting from Configure › Voice and upload it","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"announcementMediaId":{"type":"string"},"seconds":{"type":"number"}},"required":["announcementMediaId","seconds"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/templates":{"get":{"operationId":"channels.templates.list","summary":"Templates of the retailer's Messaging accounts and their review state","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"whatsappAccountId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"whatsappAccountId":{"type":"string"},"metaTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"purpose":{"type":"string"},"libraryTemplateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"components":{},"status":{"type":"string"},"qualityScore":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","recommendation"]},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","whatsappAccountId","metaTemplateId","name","language","category","purpose","libraryTemplateName","status","qualityScore","rejection","pausedUntil","updatedAt"]}}},"required":["templates"]}}}}}},"post":{"operationId":"channels.templates.create","summary":"Submit a custom template for review","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"whatsappAccountId":{"type":"string","minLength":1},"purpose":{"enum":["order_confirmed","out_for_delivery","delivered","cancelled","ready_for_pickup","payment_needed","order_updated","reorder","basket_reminder","custom"],"type":"string"},"name":{"type":"string","pattern":"^[a-z0-9_]{1,512}$"},"language":{"type":"string","minLength":2,"maxLength":10},"category":{"enum":["UTILITY","MARKETING"],"type":"string"},"components":{"type":"array","minItems":1,"items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["whatsappAccountId","purpose","name","language","category","components"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"whatsappAccountId":{"type":"string"},"metaTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"purpose":{"type":"string"},"libraryTemplateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"components":{},"status":{"type":"string"},"qualityScore":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","recommendation"]},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","whatsappAccountId","metaTemplateId","name","language","category","purpose","libraryTemplateName","status","qualityScore","rejection","pausedUntil","updatedAt"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/templates/defaults":{"post":{"operationId":"channels.templates.createDefaults","summary":"Create the order update templates (the count is shown first)","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"whatsappAccountId":{"type":"string","minLength":1},"dryRun":{"type":"boolean","default":true}},"required":["whatsappAccountId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"whatsappAccountId":{"type":"string"},"metaTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"purpose":{"type":"string"},"libraryTemplateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"components":{},"status":{"type":"string"},"qualityScore":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["reason","recommendation"]},{"type":"null"}]},"pausedUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","whatsappAccountId","metaTemplateId","name","language","category","purpose","libraryTemplateName","status","qualityScore","rejection","pausedUntil","updatedAt"]}},"wouldCreate":{"type":"array","items":{"type":"object","properties":{"purpose":{"enum":["order_confirmed","out_for_delivery","delivered","cancelled","ready_for_pickup","payment_needed","order_updated","reorder","basket_reminder","custom"],"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"fromLibrary":{"type":"boolean"}},"required":["purpose","name","language","fromLibrary"]}}},"required":["created","wouldCreate"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/templates/{templateId}":{"delete":{"operationId":"channels.templates.delete","summary":"Delete a template from Meta and here","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}}}}},"/organizations/{organizationId}/channels/whatsapp/templates/{templateId}/test":{"post":{"operationId":"channels.templates.sendTest","summary":"Send a template to a tester (its cost is shown first)","tags":["Channels"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"to":{"type":"string"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"default":{}},"confirmedCostUsd":{"type":"number","minimum":0}},"required":["connectionId","to","confirmedCostUsd"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"wamid":{"type":"string"},"costUsd":{"type":"number"}},"required":["wamid","costUsd"]}}}}}}},"/partners/mine":{"get":{"operationId":"partner.memberships","summary":"Partners the signed-in user is a member of","tags":["Partner"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/usage":{"get":{"operationId":"partner.usage","summary":"Spend per day over the partner's retailers","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/source-kinds":{"get":{"operationId":"partner.sourceKinds","summary":"Catalog platforms a retailer can be provisioned with","tags":["Partner"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/retailers":{"get":{"operationId":"partner.retailers.list","summary":"The partner's retailers with onboarding and month-to-date usage","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"partner.retailers.create","summary":"Create a retailer with its stores, catalog and admins, and start onboarding","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60,"description":"The retailer's name"},"slug":{"type":"string","minLength":2,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$","description":"Web address of the retailer (/c/<slug>); derived from the name when absent"},"externalRef":{"type":"string","minLength":1,"maxLength":100,"description":"Your id for the retailer; later calls name it in Hephon-Organization"},"stores":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Your id for the store (branch id)"},"name":{"type":"string","minLength":1,"maxLength":100},"countryCode":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$","description":"ISO 4217"},"timezone":{"type":"string"}},"required":["externalId","name","countryCode","currency"]},"description":"Stores (branches). The first one is the default"},"catalog":{"type":"object","properties":{"kind":{"enum":["SUPPY","SHOPIFY","WOOCOMMERCE","JSONL","PUSH"],"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{},"description":"Connector settings (not secret)"},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4000},"default":{},"description":"Connector credentials; stored encrypted, never returned"},"enrichCapUsd":{"type":"number","minimum":0,"maximum":100,"description":"Spend ceiling of each refresh's enrichment, in USD"}},"required":["kind"]},"agent":{"type":"object","properties":{"assistantName":{"type":"string","minLength":1,"maxLength":40},"retailerDescription":{"type":"string","maxLength":600},"languages":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","minLength":1,"maxLength":40}}}},"admins":{"type":"array","maxItems":20,"items":{"type":"string","format":"email"},"default":[],"description":"Retailer staff to invite as admins"}},"required":["name","stores","catalog"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/retailers/{organizationId}":{"get":{"operationId":"partner.retailers.get","summary":"One retailer: onboarding, usage, keys and webhook endpoints","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/retailers/{organizationId}/onboarding/retry":{"post":{"operationId":"partner.retailers.retryOnboarding","summary":"Start a failed onboarding again","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/retailers/{organizationId}/api-keys":{"post":{"operationId":"partner.retailers.createKey","summary":"Issue an API key of the retailer; it is shown once","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","minItems":1,"items":{"enum":["chat:write","conversations:read","sessions:write","catalog:read","catalog:write","orders:read","orders:write","shoppers:write","usage:read","mcp:use","*"],"type":"string"}},"allowedIps":{"type":"array","maxItems":50,"items":{"type":"string"},"default":[]}},"required":["name","scopes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/api-keys":{"get":{"operationId":"partner.apiKeys.list","summary":"The partner's API keys","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"partner.apiKeys.create","summary":"Create a partner API key; it is shown once","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","minItems":1,"items":{"enum":["chat:write","conversations:read","sessions:write","catalog:read","catalog:write","orders:read","orders:write","shoppers:write","usage:read","mcp:use","partner:read","partner:write","*"],"type":"string"}},"allowedIps":{"type":"array","maxItems":50,"items":{"type":"string"},"default":[]}},"required":["name","scopes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/api-keys/{id}/rotate":{"post":{"operationId":"partner.apiKeys.rotate","summary":"Replace a partner key; the old one works for 24 more hours","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"overlapHours":{"type":"integer","minimum":0,"maximum":168,"default":24}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/api-keys/{id}/revoke":{"post":{"operationId":"partner.apiKeys.revoke","summary":"Revoke a partner API key at once","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/webhooks":{"get":{"operationId":"partner.webhooks.list","summary":"Partner webhook endpoints and their recent deliveries","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"endpointId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"partner.webhooks.create","summary":"Add a partner webhook endpoint; its signing secret is returned once","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"eventTypes":{"type":"array","minItems":1,"maxItems":15,"items":{"enum":["organization.ready","cart.item_added","cart.item_updated","cart.item_removed","cart.cleared","cart.checkout_requested","conversation.handoff_requested","conversation.handoff_released","conversation.message","order.attributed","order.placed","order.status_changed","order.updated","order.issue_reported","shopper.data_deleted"],"type":"string"}}},"required":["url","eventTypes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/webhooks/{id}":{"patch":{"operationId":"partner.webhooks.update","summary":"Change a partner endpoint's URL, description, events or state","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"eventTypes":{"type":"array","minItems":1,"maxItems":15,"items":{"enum":["organization.ready","cart.item_added","cart.item_updated","cart.item_removed","cart.cleared","cart.checkout_requested","conversation.handoff_requested","conversation.handoff_released","conversation.message","order.attributed","order.placed","order.status_changed","order.updated","order.issue_reported","shopper.data_deleted"],"type":"string"}},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"delete":{"operationId":"partner.webhooks.delete","summary":"Delete a partner endpoint and its delivery log","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/webhooks/{id}/rotate-secret":{"post":{"operationId":"partner.webhooks.rotateSecret","summary":"New signing secret; the old one keeps signing for 24 hours","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/webhooks/{id}/test":{"post":{"operationId":"partner.webhooks.sendTest","summary":"Send a webhook.test event to one partner endpoint","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/partners/{partnerId}/webhooks/deliveries/{id}/resend":{"post":{"operationId":"partner.webhooks.resend","summary":"Send a finished partner delivery again","tags":["Partner"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/conversions":{"get":{"operationId":"orders.conversions","summary":"Orders the agent brought, revenue, cost and return on it","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"days","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/conversions/whatsapp":{"get":{"operationId":"orders.whatsappConversions","summary":"The WhatsApp funnel, cost per order and where chats came from","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"days","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"funnel":{"type":"object","properties":{"conversations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sawProducts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"filledBasket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openedCheckout":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ordered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["conversations","sawProducts","filledBasket","openedCheckout","ordered"]},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"agentCostUsd":{"type":"number"},"metaCostUsd":{"type":"number"},"costPerOrderUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"enum":["ad","link","qr","ice_breaker","direct"],"type":"string"},"conversations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ordered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["source","conversations","ordered"]}}},"required":["funnel","orders","agentCostUsd","metaCostUsd","costPerOrderUsd","bySource"]}}}}}}},"/organizations/{organizationId}/orders":{"get":{"operationId":"orders.list","summary":"Orders in one queue, newest first","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"queue","in":"query","schema":{"enum":["new","preparing","on_the_way","done","cancelled"],"type":"string","default":"new"},"allowEmptyValue":true,"allowReserved":true},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","maxLength":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["orders","nextCursor"]}}}}}}},"/organizations/{organizationId}/orders/counts":{"get":{"operationId":"orders.counts","summary":"How many orders wait in each queue","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","propertyNames":{"enum":["new","preparing","on_the_way","done","cancelled"],"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}}}}}},"/organizations/{organizationId}/orders/{orderId}":{"get":{"operationId":"orders.get","summary":"One order with its lines and timeline","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/accept":{"post":{"operationId":"orders.accept","summary":"Accept an order with its ETA","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"etaMinutes":{"type":"integer","minimum":5,"maximum":1440}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/reject":{"post":{"operationId":"orders.reject","summary":"Reject a new order","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/status":{"post":{"operationId":"orders.setStatus","summary":"Move an order to its next status","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"type":"string","maxLength":100},"etaAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/lines":{"post":{"operationId":"orders.editLines","summary":"Change quantities or remove lines (the shopper is told)","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","minItems":1,"items":{"type":"object","properties":{"catalogId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0}},"required":["catalogId","quantity"]}},"note":{"type":"string","maxLength":500}},"required":["lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/cancel":{"post":{"operationId":"orders.cancel","summary":"Cancel an order","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/resend":{"post":{"operationId":"orders.resendUpdate","summary":"Send the last update to the shopper again","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/notes":{"post":{"operationId":"orders.addNote","summary":"Add a staff note","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":2000}},"required":["note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/payment-link":{"post":{"operationId":"orders.sendPaymentLink","summary":"Send the shopper a payment link","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/address":{"post":{"operationId":"orders.confirmAddress","summary":"Set or confirm the delivery point before accepting","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"note":{"type":"string","maxLength":500}},"required":["latitude","longitude"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"enum":["REPORTED","PLACED"],"type":"string"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","phone"]},{"type":"null"}]},"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"fulfilment":{"anyOf":[{"enum":["DELIVERY","PICKUP"],"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"slotStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"slotEnd":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"paymentStatus":{"enum":["NOT_REQUIRED","PENDING","PAID","FAILED","REFUNDED"],"type":"string"},"currency":{"type":"string"},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"itemCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"addressNeedsConfirmation":{"type":"boolean"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"number"},"unitPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"fromBasket":{"type":"boolean"},"lineStatus":{"anyOf":[{"enum":["ok","unavailable","substituted","edited"],"type":"string"},{"type":"null"}]},"originalQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["itemId","catalogId","productId","title","imageUrl","quantity","unitPrice","fromBasket","lineStatus","originalQuantity"]}},"subtotal":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryFee":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"null"}]},"deliveryAddress":{"anyOf":[{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"}},"required":["label","area","building","floor","apartment","landmark","notes","latitude","longitude","geoSource"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"substitution":{"anyOf":[{"enum":["SIMILAR","NONE"],"type":"string"},{"type":"null"}]},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledBy":{"anyOf":[{"enum":["shopper","retailer","system"],"type":"string"},{"type":"null"}]},"etaAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkoutId":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"actorKind":{"type":"string"},"actorName":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{},"shopperMessage":{"anyOf":[{"type":"object","properties":{"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["wamid","templateName","text","status"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","type","actorKind","actorName","shopperMessage","createdAt"]}}},"required":["id","number","externalOrderId","status","statusLabel","origin","backend","customer","store","fulfilment","area","slotStart","slotEnd","paymentMethod","paymentStatus","currency","total","itemCount","placedAt","acceptedAt","addressNeedsConfirmation","surface","lines","subtotal","deliveryFee","discount","deliveryAddress","notes","substitution","paymentUrl","cancelReason","cancelledBy","etaAt","conversationId","connectionId","checkoutId","events"]}}}}}}},"/organizations/{organizationId}/orders/{orderId}/preview":{"post":{"operationId":"orders.preview","summary":"What the shopper gets for an action, and its cost","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"enum":["accept","reject","status","edit_lines","cancel","payment_link"],"type":"string"},"status":{"enum":["PLACED","CONFIRMED","IN_PROGRESS","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED","RETURNED"],"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sends":{"type":"boolean"},"mode":{"enum":["free_form","template","none"],"type":"string"},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"costUsd":{"type":"number"}},"required":["sends","mode","templateName","text","costUsd"]}}}}}}},"/organizations/{organizationId}/orders/setup":{"get":{"operationId":"orders.settings.get","summary":"Ordering rules","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"checkoutMode":{"enum":["auto","flow","buttons"],"type":"string","default":"auto"},"paymentMethods":{"type":"array","minItems":1,"items":{"enum":["cash","card_on_delivery","link"],"type":"string"},"default":["cash"]},"deliveryDefaults":{"type":"object","properties":{"fee":{"type":"number","minimum":0,"default":0},"freeAbove":{"type":"number","minimum":0},"minimumOrder":{"type":"number","minimum":0},"slotMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":60},"leadMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":60},"capacityPerSlot":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"horizonDays":{"type":"integer","minimum":1,"maximum":14,"default":2}},"default":{}},"pickup":{"type":"boolean","default":false},"cancelUntil":{"enum":["PLACED","CONFIRMED","IN_PROGRESS"],"type":"string","default":"PLACED"},"autoCancelUnacceptedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"acceptSlaMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":5},"notifyEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"orderNumberPrefix":{"type":"string","maxLength":8,"default":"H-"},"shopperUpdates":{"type":"object","properties":{"CONFIRMED":{"type":"boolean","default":true},"IN_PROGRESS":{"type":"boolean","default":false},"READY_FOR_PICKUP":{"type":"boolean","default":true},"OUT_FOR_DELIVERY":{"type":"boolean","default":true},"DELIVERED":{"type":"boolean","default":true},"CANCELLED":{"type":"boolean","default":true},"RETURNED":{"type":"boolean","default":false}},"default":{}},"notifyReportedOrders":{"type":"boolean","default":false},"quoteTtlMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":15}}}}}}}},"put":{"operationId":"orders.settings.save","summary":"Save ordering rules","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"checkoutMode":{"enum":["auto","flow","buttons"],"type":"string","default":"auto"},"paymentMethods":{"type":"array","minItems":1,"items":{"enum":["cash","card_on_delivery","link"],"type":"string"},"default":["cash"]},"deliveryDefaults":{"type":"object","properties":{"fee":{"type":"number","minimum":0,"default":0},"freeAbove":{"type":"number","minimum":0},"minimumOrder":{"type":"number","minimum":0},"slotMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":60},"leadMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":60},"capacityPerSlot":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"horizonDays":{"type":"integer","minimum":1,"maximum":14,"default":2}},"default":{}},"pickup":{"type":"boolean","default":false},"cancelUntil":{"enum":["PLACED","CONFIRMED","IN_PROGRESS"],"type":"string","default":"PLACED"},"autoCancelUnacceptedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"acceptSlaMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":5},"notifyEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"orderNumberPrefix":{"type":"string","maxLength":8,"default":"H-"},"shopperUpdates":{"type":"object","properties":{"CONFIRMED":{"type":"boolean","default":true},"IN_PROGRESS":{"type":"boolean","default":false},"READY_FOR_PICKUP":{"type":"boolean","default":true},"OUT_FOR_DELIVERY":{"type":"boolean","default":true},"DELIVERED":{"type":"boolean","default":true},"CANCELLED":{"type":"boolean","default":true},"RETURNED":{"type":"boolean","default":false}},"default":{}},"notifyReportedOrders":{"type":"boolean","default":false},"quoteTtlMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":15}}}},"required":["settings"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"checkoutMode":{"enum":["auto","flow","buttons"],"type":"string","default":"auto"},"paymentMethods":{"type":"array","minItems":1,"items":{"enum":["cash","card_on_delivery","link"],"type":"string"},"default":["cash"]},"deliveryDefaults":{"type":"object","properties":{"fee":{"type":"number","minimum":0,"default":0},"freeAbove":{"type":"number","minimum":0},"minimumOrder":{"type":"number","minimum":0},"slotMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":60},"leadMinutes":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":60},"capacityPerSlot":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"horizonDays":{"type":"integer","minimum":1,"maximum":14,"default":2}},"default":{}},"pickup":{"type":"boolean","default":false},"cancelUntil":{"enum":["PLACED","CONFIRMED","IN_PROGRESS"],"type":"string","default":"PLACED"},"autoCancelUnacceptedMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"acceptSlaMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":5},"notifyEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[]},"orderNumberPrefix":{"type":"string","maxLength":8,"default":"H-"},"shopperUpdates":{"type":"object","properties":{"CONFIRMED":{"type":"boolean","default":true},"IN_PROGRESS":{"type":"boolean","default":false},"READY_FOR_PICKUP":{"type":"boolean","default":true},"OUT_FOR_DELIVERY":{"type":"boolean","default":true},"DELIVERED":{"type":"boolean","default":true},"CANCELLED":{"type":"boolean","default":true},"RETURNED":{"type":"boolean","default":false}},"default":{}},"notifyReportedOrders":{"type":"boolean","default":false},"quoteTtlMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"default":15}}}}}}}}},"/organizations/{organizationId}/orders/setup/backend":{"get":{"operationId":"orders.backend.get","summary":"How orders reach the retailer","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["TICKET","ORDERS_API","SOURCE"],"type":"string"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"secretSet":{"type":"boolean"},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"conformance":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time","x-native-type":"date"},"results":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"passed":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["check","passed","detail"]}}},"required":["passed","checkedAt","results"]},{"type":"null"}]},"fallbackToTicket":{"type":"boolean"},"enabled":{"type":"boolean"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"openApiUrl":{"type":"string"}},"required":["kind","sourceId","baseUrl","secretSet","capabilities","conformance","fallbackToTicket","enabled","lastError","openApiUrl"]}}}}}},"put":{"operationId":"orders.backend.update","summary":"Choose order tickets, the retailer's Orders API or its platform","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["TICKET","ORDERS_API","SOURCE"],"type":"string"},"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"baseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"fallbackToTicket":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["TICKET","ORDERS_API","SOURCE"],"type":"string"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"secretSet":{"type":"boolean"},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"conformance":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time","x-native-type":"date"},"results":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"passed":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["check","passed","detail"]}}},"required":["passed","checkedAt","results"]},{"type":"null"}]},"fallbackToTicket":{"type":"boolean"},"enabled":{"type":"boolean"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"openApiUrl":{"type":"string"}},"required":["kind","sourceId","baseUrl","secretSet","capabilities","conformance","fallbackToTicket","enabled","lastError","openApiUrl"]}}}}}}},"/organizations/{organizationId}/orders/setup/backend/test":{"post":{"operationId":"orders.backend.test","summary":"Run the conformance checks against the retailer's endpoints","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["TICKET","ORDERS_API","SOURCE"],"type":"string"},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"secretSet":{"type":"boolean"},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"conformance":{"anyOf":[{"type":"object","properties":{"passed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time","x-native-type":"date"},"results":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"passed":{"type":"boolean"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["check","passed","detail"]}}},"required":["passed","checkedAt","results"]},{"type":"null"}]},"fallbackToTicket":{"type":"boolean"},"enabled":{"type":"boolean"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"openApiUrl":{"type":"string"}},"required":["kind","sourceId","baseUrl","secretSet","capabilities","conformance","fallbackToTicket","enabled","lastError","openApiUrl"]}}}}}}},"/organizations/{organizationId}/orders/setup/backend/secret":{"post":{"operationId":"orders.backend.rotateSecret","summary":"Rotate the signing secret (shown once; the old one works for a day)","tags":["Orders"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"previousExpiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["secret","previousExpiresAt"]}}}}}}},"/organizations/{organizationId}/domains":{"get":{"operationId":"domains.list","summary":"Custom domains for the hosted chat","tags":["Domains"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"domains.add","summary":"Add a custom domain for the hosted chat","tags":["Domains"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","maxLength":300}},"required":["hostname"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/domains/{id}/refresh":{"post":{"operationId":"domains.refresh","summary":"Ask Cloudflare where a custom domain stands now","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/domains/{id}":{"delete":{"operationId":"domains.remove","summary":"Stop serving the chat on a custom domain","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/privacy":{"get":{"operationId":"privacy.settings","summary":"How long conversations are kept and whether personal details are masked","tags":["Privacy"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"patch":{"operationId":"privacy.update","summary":"Change the retention period or PII masking","tags":["Privacy"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"retentionDays":{"type":"integer","minimum":7,"maximum":3650},"piiMasking":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/privacy/retention-impact":{"get":{"operationId":"privacy.retentionImpact","summary":"Conversations a retention period would delete","tags":["Privacy"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"retentionDays","in":"query","required":true,"schema":{"type":"integer","minimum":7,"maximum":3650},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/privacy/deletions":{"get":{"operationId":"privacy.deletions.list","summary":"Recent shopper data deletion requests","tags":["Privacy"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}},"post":{"operationId":"privacy.deletions.create","summary":"Delete everything stored about one shopper","tags":["Privacy"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalShopperId":{"type":"string","minLength":1,"maxLength":128}},"required":["externalShopperId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/sdk-releases":{"get":{"operationId":"sdkReleases.list","summary":"Released versions of the native SDKs, newest first","tags":["Embed"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}}}}}},"/organizations/{organizationId}/stores":{"get":{"operationId":"stores.list","summary":"Branches with their zones, hours and fulfilment","tags":["Stores"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"stores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"countryCode":{"type":"string"},"currency":{"type":"string"},"isDefault":{"type":"boolean"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryZone":{"anyOf":[{"type":"object","properties":{"type":{"enum":["Polygon","MultiPolygon"],"type":"string"},"coordinates":{"type":"array","minItems":1,"items":{"anyOf":[{},{"type":"null"}]}}},"required":["type","coordinates"]},{"type":"null"}]},"deliveryRadiusM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"type":"object","propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"],"type":"string"},"additionalProperties":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$"}]}}},"closed":{"type":"array","items":{"type":"string","format":"date"},"default":[]}},"required":["weekly"]},{"type":"null"}]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryEnabled":{"type":"boolean"},"pickupEnabled":{"type":"boolean"},"geoSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"fulfilment":{"anyOf":[{"type":"object","properties":{"fee":{"type":"string"},"freeAbove":{"type":"string"},"minimumOrder":{"type":"string"},"slotMinutes":{"type":"integer","minimum":15,"maximum":240},"leadMinutes":{"type":"integer","minimum":0,"maximum":1440},"capacityPerSlot":{"type":"integer","minimum":1,"maximum":9007199254740991}}},{"type":"null"}]},"zoneAreaM2":{"anyOf":[{"type":"number"},{"type":"null"}]},"problems":{"type":"array","items":{"type":"string"}}},"required":["id","externalId","name","countryCode","currency","isDefault","latitude","longitude","address","phone","deliveryZone","deliveryRadiusM","hours","priority","deliveryEnabled","pickupEnabled","geoSource","fulfilment","zoneAreaM2","problems"]}}},"required":["stores"]}}}}}}},"/organizations/{organizationId}/stores/{storeId}":{"get":{"operationId":"stores.get","summary":"One branch","tags":["Stores"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"storeId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"countryCode":{"type":"string"},"currency":{"type":"string"},"isDefault":{"type":"boolean"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryZone":{"anyOf":[{"type":"object","properties":{"type":{"enum":["Polygon","MultiPolygon"],"type":"string"},"coordinates":{"type":"array","minItems":1,"items":{"anyOf":[{},{"type":"null"}]}}},"required":["type","coordinates"]},{"type":"null"}]},"deliveryRadiusM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"type":"object","propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"],"type":"string"},"additionalProperties":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$"}]}}},"closed":{"type":"array","items":{"type":"string","format":"date"},"default":[]}},"required":["weekly"]},{"type":"null"}]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryEnabled":{"type":"boolean"},"pickupEnabled":{"type":"boolean"},"geoSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"fulfilment":{"anyOf":[{"type":"object","properties":{"fee":{"type":"string"},"freeAbove":{"type":"string"},"minimumOrder":{"type":"string"},"slotMinutes":{"type":"integer","minimum":15,"maximum":240},"leadMinutes":{"type":"integer","minimum":0,"maximum":1440},"capacityPerSlot":{"type":"integer","minimum":1,"maximum":9007199254740991}}},{"type":"null"}]},"zoneAreaM2":{"anyOf":[{"type":"number"},{"type":"null"}]},"problems":{"type":"array","items":{"type":"string"}}},"required":["id","externalId","name","countryCode","currency","isDefault","latitude","longitude","address","phone","deliveryZone","deliveryRadiusM","hours","priority","deliveryEnabled","pickupEnabled","geoSource","fulfilment","zoneAreaM2","problems"]}}}}}},"patch":{"operationId":"stores.update","summary":"Change a branch's location, zone, hours or fulfilment","tags":["Stores"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"storeId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"deliveryZone":{"anyOf":[{"type":"object","properties":{"type":{"enum":["Polygon","MultiPolygon"],"type":"string"},"coordinates":{"type":"array","minItems":1,"items":{}}},"required":["type","coordinates"]},{"type":"null"}]},"deliveryRadiusM":{"anyOf":[{"type":"integer","minimum":100,"maximum":100000},{"type":"null"}]},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"type":"object","propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"],"type":"string"},"additionalProperties":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$"}]}}},"closed":{"type":"array","items":{"type":"string","format":"date"},"default":[]}},"required":["weekly"]},{"type":"null"}]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryEnabled":{"type":"boolean"},"pickupEnabled":{"type":"boolean"},"fulfilment":{"anyOf":[{"type":"object","properties":{"fee":{"type":"string"},"freeAbove":{"type":"string"},"minimumOrder":{"type":"string"},"slotMinutes":{"type":"integer","minimum":15,"maximum":240},"leadMinutes":{"type":"integer","minimum":0,"maximum":1440},"capacityPerSlot":{"type":"integer","minimum":1,"maximum":9007199254740991}}},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"countryCode":{"type":"string"},"currency":{"type":"string"},"isDefault":{"type":"boolean"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryZone":{"anyOf":[{"type":"object","properties":{"type":{"enum":["Polygon","MultiPolygon"],"type":"string"},"coordinates":{"type":"array","minItems":1,"items":{"anyOf":[{},{"type":"null"}]}}},"required":["type","coordinates"]},{"type":"null"}]},"deliveryRadiusM":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"type":"object","propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"],"type":"string"},"additionalProperties":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-4]):[0-5]\\d$"}]}}},"closed":{"type":"array","items":{"type":"string","format":"date"},"default":[]}},"required":["weekly"]},{"type":"null"}]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveryEnabled":{"type":"boolean"},"pickupEnabled":{"type":"boolean"},"geoSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"fulfilment":{"anyOf":[{"type":"object","properties":{"fee":{"type":"string"},"freeAbove":{"type":"string"},"minimumOrder":{"type":"string"},"slotMinutes":{"type":"integer","minimum":15,"maximum":240},"leadMinutes":{"type":"integer","minimum":0,"maximum":1440},"capacityPerSlot":{"type":"integer","minimum":1,"maximum":9007199254740991}}},{"type":"null"}]},"zoneAreaM2":{"anyOf":[{"type":"number"},{"type":"null"}]},"problems":{"type":"array","items":{"type":"string"}}},"required":["id","externalId","name","countryCode","currency","isDefault","latitude","longitude","address","phone","deliveryZone","deliveryRadiusM","hours","priority","deliveryEnabled","pickupEnabled","geoSource","fulfilment","zoneAreaM2","problems"]}}}}}}},"/organizations/{organizationId}/stores/import-geo":{"post":{"operationId":"stores.importGeo","summary":"Read locations and zones from the catalog connector","tags":["Stores"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated","skipped"]}}}}}}},"/organizations/{organizationId}/stores/check-location":{"post":{"operationId":"stores.checkLocation","summary":"Which branch serves a pin, a Maps link or an area","tags":["Stores"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"where":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"object","properties":{"mapsUrl":{"type":"string","format":"uri"}},"required":["mapsUrl"]},{"type":"object","properties":{"area":{"type":"string","minLength":2,"maxLength":200}},"required":["area"]}]}},"required":["where"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"store":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"}},"required":["id","externalId","name"]},{"type":"null"}]},"rule":{"enum":["adapter","zone","radius","area","nearest"],"type":"string"},"reason":{"anyOf":[{"enum":["not_covered","closed","ambiguous"],"type":"string"},{"type":"null"}]},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"distanceM":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","distanceM"]}},"pointless":{"type":"boolean"},"nearestPickup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"distanceM":{"type":"number"},"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","distanceM","latitude","longitude","address"]},{"type":"null"}]}},"required":["store","rule","reason","candidates","pointless","nearestPickup"]}}}}}}},"/organizations/{organizationId}/customers":{"get":{"operationId":"customers.list","summary":"Customers, most recently seen first","tags":["Customers"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"q","in":"query","schema":{"type":"string","maxLength":100},"allowEmptyValue":true,"allowReserved":true},{"name":"marketing","in":"query","schema":{"enum":["opted_in","opted_out","unknown"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"storeId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStore":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"marketing":{"enum":["opted_in","opted_out","unknown"],"type":"string"},"linked":{"type":"boolean"}},"required":["id","name","profileName","phone","lastStore","orders","spent","currency","lastSeenAt","marketing","linked"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["customers","nextCursor"]}}}}}}},"/organizations/{organizationId}/customers/{customerId}":{"get":{"operationId":"customers.get","summary":"One customer with addresses, consents, chats and orders","tags":["Customers"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"revealPhone","in":"query","schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStore":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"marketing":{"enum":["opted_in","opted_out","unknown"],"type":"string"},"linked":{"type":"boolean"},"externalShopperId":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"retailerCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"privacyNoticeAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"marketingSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketingChangedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"memoryAllowed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","label","area","building","floor","apartment","landmark","latitude","longitude","geoSource","lastUsedAt"]}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","channel","status","lastMessageAt"]}},"recentOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"type":"string"},"total":{"type":"string"},"currency":{"type":"string"},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","externalOrderId","status","total","currency","placedAt"]}},"conversationCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastOrderAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","profileName","phone","lastStore","orders","spent","currency","lastSeenAt","marketing","linked","externalShopperId","username","language","retailerCustomerId","linkedAt","privacyNoticeAt","marketingSource","marketingChangedAt","memoryAllowed","addresses","conversations","recentOrders","conversationCount","lastOrderAt"]}}}}}},"patch":{"operationId":"customers.update","summary":"Change a customer's name or language, or record a marketing opt-out","tags":["Customers"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"language":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"marketing":{"const":"opted_out"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStore":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"marketing":{"enum":["opted_in","opted_out","unknown"],"type":"string"},"linked":{"type":"boolean"},"externalShopperId":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"retailerCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"privacyNoticeAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"marketingSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketingChangedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"memoryAllowed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","label","area","building","floor","apartment","landmark","latitude","longitude","geoSource","lastUsedAt"]}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","channel","status","lastMessageAt"]}},"recentOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"type":"string"},"total":{"type":"string"},"currency":{"type":"string"},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","externalOrderId","status","total","currency","placedAt"]}},"conversationCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastOrderAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","profileName","phone","lastStore","orders","spent","currency","lastSeenAt","marketing","linked","externalShopperId","username","language","retailerCustomerId","linkedAt","privacyNoticeAt","marketingSource","marketingChangedAt","memoryAllowed","addresses","conversations","recentOrders","conversationCount","lastOrderAt"]}}}}}}},"/organizations/{organizationId}/customers/{customerId}/addresses/{addressId}":{"delete":{"operationId":"customers.deleteAddress","summary":"Remove a saved address","tags":["Customers"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"addressId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"]}}}}}}},"/organizations/{organizationId}/customers/{customerId}/unlink":{"post":{"operationId":"customers.unlink","summary":"Forget the link to the retailer's own customer account","tags":["Customers"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastStore":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"orders":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"marketing":{"enum":["opted_in","opted_out","unknown"],"type":"string"},"linked":{"type":"boolean"},"externalShopperId":{"type":"string"},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"retailerCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"linkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"privacyNoticeAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"marketingSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"marketingChangedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"memoryAllowed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"area":{"anyOf":[{"type":"string"},{"type":"null"}]},"building":{"anyOf":[{"type":"string"},{"type":"null"}]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}]},"apartment":{"anyOf":[{"type":"string"},{"type":"null"}]},"landmark":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"geoSource":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","label","area","building","floor","apartment","landmark","latitude","longitude","geoSource","lastUsedAt"]}},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","channel","status","lastMessageAt"]}},"recentOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"externalOrderId":{"type":"string"},"status":{"type":"string"},"total":{"type":"string"},"currency":{"type":"string"},"placedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","number","externalOrderId","status","total","currency","placedAt"]}},"conversationCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastOrderAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","profileName","phone","lastStore","orders","spent","currency","lastSeenAt","marketing","linked","externalShopperId","username","language","retailerCustomerId","linkedAt","privacyNoticeAt","marketingSource","marketingChangedAt","memoryAllowed","addresses","conversations","recentOrders","conversationCount","lastOrderAt"]}}}}}}},"/organizations/{organizationId}/calls":{"get":{"operationId":"calls.list","summary":"Calls, newest first","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"status","in":"query","schema":{"enum":["RINGING","CONNECTING","LIVE","ENDED","MISSED","REJECTED","FAILED"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","maxLength":100},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerName":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["RINGING","CONNECTING","LIVE","ENDED","MISSED","REJECTED","FAILED"],"type":"string"},"endReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"ringingAt":{"type":"string","format":"date-time","x-native-type":"date"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"turns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costUsd":{"type":"number"},"hasRecording":{"type":"boolean"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","externalId","connectionId","conversationId","callerName","callerPhone","status","endReason","ringingAt","answeredAt","endedAt","durationSeconds","turns","costUsd","hasRecording","summary"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["calls","nextCursor"]}}}}}}},"/organizations/{organizationId}/calls/live":{"get":{"operationId":"calls.live","summary":"Calls ringing or in progress","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerName":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["RINGING","CONNECTING","LIVE","ENDED","MISSED","REJECTED","FAILED"],"type":"string"},"endReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"ringingAt":{"type":"string","format":"date-time","x-native-type":"date"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"turns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costUsd":{"type":"number"},"hasRecording":{"type":"boolean"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","externalId","connectionId","conversationId","callerName","callerPhone","status","endReason","ringingAt","answeredAt","endedAt","durationSeconds","turns","costUsd","hasRecording","summary"]}}},"required":["calls"]}}}}}}},"/organizations/{organizationId}/calls/{callId}":{"get":{"operationId":"calls.get","summary":"One call with its timeline and media stats","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"callId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerName":{"anyOf":[{"type":"string"},{"type":"null"}]},"callerPhone":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["RINGING","CONNECTING","LIVE","ENDED","MISSED","REJECTED","FAILED"],"type":"string"},"endReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"ringingAt":{"type":"string","format":"date-time","x-native-type":"date"},"answeredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"turns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"costUsd":{"type":"number"},"hasRecording":{"type":"boolean"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"type":"string"},"errorCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorDocUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"bargeIns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstAudioMsP50":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sttSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ttsSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stats":{"anyOf":[{"type":"object","properties":{"rtpLossPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"jitterMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"rttMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"noiseDropped":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"heldTurns":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"dtmf":{"type":"array","items":{"type":"string"}}},"required":["rtpLossPct","jitterMs","rttMs","noiseDropped","heldTurns","dtmf"]},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"type":{"type":"string"},"ms":{"anyOf":[{"type":"number"},{"type":"null"}]},"detail":{}},"required":["at","type","ms"]}},"recordingSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"recordingExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"voiceInstance":{"anyOf":[{"type":"string"},{"type":"null"}]},"entry":{"anyOf":[{"type":"object","properties":{"ctaPayload":{"anyOf":[{"type":"string"},{"type":"null"}]},"deeplinkPayload":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ctaPayload","deeplinkPayload"]},{"type":"null"}]},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","externalId","connectionId","conversationId","callerName","callerPhone","status","endReason","ringingAt","answeredAt","endedAt","durationSeconds","turns","costUsd","hasRecording","summary","direction","errorCode","errorTitle","errorDocUrl","bargeIns","firstAudioMsP50","sttSeconds","ttsSeconds","stats","events","recordingSeconds","recordingExpiresAt","voiceInstance","entry","orderId"]}}}}}}},"/organizations/{organizationId}/calls/stats":{"get":{"operationId":"calls.stats","summary":"Calls answered, missed, length and cost over a window","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":30},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"averageSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"costUsd":{"type":"number"},"ordersPlaced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calls","answered","missed","failed","averageSeconds","costUsd","ordersPlaced"]}}}}}}},"/organizations/{organizationId}/calls/{callId}/recording":{"get":{"operationId":"calls.recordingUrl","summary":"A signed link to the recording, valid for 5 minutes","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"callId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["url","expiresAt"]}}}}}}},"/organizations/{organizationId}/calls/{callId}/end":{"post":{"operationId":"calls.end","summary":"Hang up a live call","tags":["Calls"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"callId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ended":{"type":"boolean"}},"required":["ended"]}}}}}}},"/organizations/{organizationId}/logs":{"get":{"operationId":"logs.list","summary":"Channel logs, newest first","tags":["Logs"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"source","in":"query","schema":{"enum":["WEBHOOK_IN","GRAPH_OUT","FLOW_ENDPOINT","CALL_SIGNAL","ORDER_ADAPTER","ACCOUNT","HEALTH_CHECK"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"outcome","in":"query","schema":{"enum":["OK","FAILED","IGNORED","DUPLICATE"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"type":"string","maxLength":100},"allowEmptyValue":true,"allowReserved":true},{"name":"errorCode","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["WEBHOOK_IN","GRAPH_OUT","FLOW_ENDPOINT","CALL_SIGNAL","ORDER_ADAPTER","ACCOUNT","HEALTH_CHECK"],"type":"string"},"type":{"type":"string"},"outcome":{"enum":["OK","FAILED","IGNORED","DUPLICATE"],"type":"string"},"severity":{"anyOf":[{"enum":["CRITICAL","WARNING","INFO"],"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"callId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shopperName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","source","type","outcome","severity","summary","httpStatus","durationMs","errorCode","errorTitle","connectionId","wamid","callId","conversationId","customerId","orderId","shopperName","createdAt"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["logs","nextCursor"]}}}}}}},"/organizations/{organizationId}/logs/errors":{"get":{"operationId":"logs.errors","summary":"Errors grouped by code over a window","tags":["Logs"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"hours","in":"query","schema":{"type":"integer","minimum":1,"maximum":720,"default":24},"allowEmptyValue":true,"allowReserved":true},{"name":"connectionId","in":"query","schema":{"type":"string","minLength":1},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"errorCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"title":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["errorCode","title","count","lastAt"]}}},"required":["groups"]}}}}}}},"/organizations/{organizationId}/logs/{logId}":{"get":{"operationId":"logs.get","summary":"One log row with what happened and what to do","tags":["Logs"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["WEBHOOK_IN","GRAPH_OUT","FLOW_ENDPOINT","CALL_SIGNAL","ORDER_ADAPTER","ACCOUNT","HEALTH_CHECK"],"type":"string"},"type":{"type":"string"},"outcome":{"enum":["OK","FAILED","IGNORED","DUPLICATE"],"type":"string"},"severity":{"anyOf":[{"enum":["CRITICAL","WARNING","INFO"],"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"callId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shopperName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"request":{},"response":{},"explanation":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"action":{"type":"string"},"docUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","action","docUrl"]},{"type":"null"}]},"curl":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"enum":["WEBHOOK_IN","GRAPH_OUT","FLOW_ENDPOINT","CALL_SIGNAL","ORDER_ADAPTER","ACCOUNT","HEALTH_CHECK"],"type":"string"},"type":{"type":"string"},"outcome":{"enum":["OK","FAILED","IGNORED","DUPLICATE"],"type":"string"},"severity":{"anyOf":[{"enum":["CRITICAL","WARNING","INFO"],"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"errorTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"wamid":{"anyOf":[{"type":"string"},{"type":"null"}]},"callId":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shopperName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","source","type","outcome","severity","summary","httpStatus","durationMs","errorCode","errorTitle","connectionId","wamid","callId","conversationId","customerId","orderId","shopperName","createdAt"]}},"replayable":{"type":"boolean"}},"required":["id","source","type","outcome","severity","summary","httpStatus","durationMs","errorCode","errorTitle","connectionId","wamid","callId","conversationId","customerId","orderId","shopperName","createdAt","explanation","curl","timeline","replayable"]}}}}}}},"/organizations/{organizationId}/logs/{logId}/replay":{"post":{"operationId":"logs.replay","summary":"Send a failed request again, when the replay policy allows it","tags":["Logs"],"parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"logId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"logId":{"type":"string"},"outcome":{"type":"string"}},"required":["logId","outcome"]}}}}}}},"/auth/sign-in/social":{"post":{"tags":["Default"],"description":"Sign in with a social provider","operationId":"socialSignIn","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"Callback URL to redirect to after the user has signed in"},"newUserCallbackURL":{"type":"string"},"errorCallbackURL":{"type":"string","description":"Callback URL to redirect to if an error happens"},"provider":{"anyOf":[{"type":"string","enum":["apple","atlassian","cognito","discord","facebook","figma","github","microsoft","google","huggingface","slack","spotify","twitch","twitter","dropbox","kick","linear","linkedin","gitlab","tiktok","reddit","roblox","salesforce","vk","zoom","notion","kakao","naver","line","paybin","paypal","polar","railway","vercel","wechat"]},{"type":"string"}]},"disableRedirect":{"type":"boolean","description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"idToken":{"type":"object","properties":{"token":{"type":"string","description":"ID token from the provider"},"nonce":{"type":"string","description":"Nonce used to generate the token"},"accessToken":{"type":"string","description":"Access token from the provider"},"refreshToken":{"type":"string","description":"Refresh token from the provider"},"expiresAt":{"type":"number","description":"Expiry date of the token"},"user":{"type":"object","properties":{"name":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"email":{"type":"string"}},"description":"The user object from the provider. Only available for some providers like Apple."}},"required":["token"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Array of scopes to request from the provider. This will override the default scopes passed."},"requestSignUp":{"type":"boolean","description":"Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider"},"loginHint":{"type":"string","description":"The login hint to use for the authorization code request"},"additionalData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["provider"]}}}},"responses":{"200":{"description":"Success - Returns session details (idToken branch) or an authorize URL (redirect branch)","content":{"application/json":{"schema":{"type":"object","description":"Returns session details when idToken is provided, or an authorize URL otherwise","properties":{"token":{"type":"string"},"user":{"type":"object","$ref":"#/components/schemas/User"},"url":{"type":"string"},"redirect":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/callback/{id}":{"get":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"error":{"type":"string"},"device_id":{"type":"string"},"error_description":{"type":"string"},"state":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/get-session":{"get":{"tags":["Default"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Default"],"description":"Get the current session","operationId":"getSessionPost","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-out":{"post":{"tags":["Default"],"description":"Sign out the current user","operationId":"signOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-up/email":{"post":{"tags":["Default"],"description":"Sign up a user using email and password","operationId":"signUpWithEmailAndPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"image":{"type":"string","description":"The profile image URL of the user"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."},"onboardingComplete":{"type":"boolean"},"locale":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"onboardingStep":{"type":"number"},"username":{"type":"string"},"displayUsername":{"type":"string"}},"required":["name","email","password"]}}}},"responses":{"200":{"description":"Successfully created user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"Authentication token for the session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"422":{"description":"Unprocessable Entity. User already exists or failed to create user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-in/email":{"post":{"tags":["Default"],"description":"Sign in with email and password","operationId":"signInEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":"string","description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"redirect":{"type":"boolean","enum":[false]},"token":{"type":"string","description":"Session token"},"url":{"type":"string","nullable":true},"user":{"type":"object","$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/reset-password":{"post":{"tags":["Default"],"description":"Reset the password for a user","operationId":"resetPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":"string","description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/verify-password":{"post":{"tags":["Default"],"description":"Verify the current user's password","operationId":"verifyPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The password to verify"}},"required":["password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/verify-email":{"get":{"tags":["Default"],"description":"Verify the email of the user","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","description":"The token to verify the email","required":true,"schema":{"type":"string"}},{"name":"callbackURL","in":"query","description":"The URL to redirect to after email verification","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the email was verified successfully"}},"required":["user","status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/send-verification-email":{"post":{"tags":["Default"],"description":"Send a verification email to the user","operationId":"sendVerificationEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email to send the verification email to","example":"user@example.com"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback","example":"https://example.com/callback","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the email was sent successfully","example":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Verification email isn't enabled"}}}}}},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/change-email":{"post":{"tags":["Default"],"operationId":"changeEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"The new email address to set must be a valid email address"},"callbackURL":{"type":"string","description":"The URL to redirect to after email verification"}},"required":["newEmail"]}}}},"responses":{"200":{"description":"Email change request processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the request was successful"},"message":{"type":"string","enum":["Email updated","Verification email sent"],"description":"Status message of the email change process","nullable":true}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/change-password":{"post":{"tags":["Default"],"description":"Change the password of the user","operationId":"changePassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"currentPassword":{"type":"string","description":"The current password is required"},"revokeOtherSessions":{"type":"boolean","description":"Must be a boolean value"}},"required":["newPassword","currentPassword"]}}}},"responses":{"200":{"description":"Password successfully changed","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"New session token if other sessions were revoked"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/update-session":{"post":{"tags":["Default"],"description":"Update the current session","operationId":"updateSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string","description":"Field name must be a string"},"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","$ref":"#/components/schemas/Session"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/update-user":{"post":{"tags":["Default"],"description":"Update the current user","operationId":"updateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","description":"The image of the user","nullable":true},"onboardingComplete":{"type":"boolean"},"locale":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"onboardingStep":{"type":"number"},"username":{"type":"string"},"displayUsername":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/delete-user":{"post":{"tags":["Default"],"description":"Delete the user","operationId":"deleteUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The callback URL to redirect to after the user is deleted"},"password":{"type":"string","description":"The user's password. Required if session is not fresh"},"token":{"type":"string","description":"The deletion verification token"}}}}}},"responses":{"200":{"description":"User deletion processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"message":{"type":"string","enum":["User deleted","Verification email sent"],"description":"Status message of the deletion process"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/request-password-reset":{"post":{"tags":["Default"],"description":"Send a password reset email to the user","operationId":"requestPasswordReset","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":"string","description":"The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/reset-password/{token}":{"get":{"tags":["Default"],"description":"Redirects the user to the callback URL with the token","operationId":"resetPasswordCallback","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/list-sessions":{"get":{"tags":["Default"],"description":"List all active sessions for the user","operationId":"listUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/revoke-session":{"post":{"tags":["Default"],"description":"Revoke a single session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the session was revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/revoke-sessions":{"post":{"tags":["Default"],"description":"Revoke all sessions for the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/revoke-other-sessions":{"post":{"tags":["Default"],"description":"Revoke all other sessions for the user except the current one","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all other sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/link-social":{"post":{"tags":["Default"],"description":"Link a social account to the user","operationId":"linkSocialAccount","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after the user has signed in"},"provider":{"anyOf":[{"type":"string","enum":["apple","atlassian","cognito","discord","facebook","figma","github","microsoft","google","huggingface","slack","spotify","twitch","twitter","dropbox","kick","linear","linkedin","gitlab","tiktok","reddit","roblox","salesforce","vk","zoom","notion","kakao","naver","line","paybin","paypal","polar","railway","vercel","wechat"]},{"type":"string"}]},"idToken":{"type":"object","properties":{"token":{"type":"string"},"nonce":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["token"]},"requestSignUp":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string"},"description":"Additional scopes to request from the provider"},"errorCallbackURL":{"type":"string","description":"The URL to redirect to if there is an error during the link process"},"disableRedirect":{"type":"boolean","description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"additionalData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["provider"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The authorization URL to redirect the user to"},"redirect":{"type":"boolean","description":"Indicates if the user should be redirected to the authorization URL"},"status":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/list-accounts":{"get":{"tags":["Default"],"description":"List all accounts linked to the user","operationId":"listUserAccounts","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountId":{"type":"string"},"userId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","providerId","createdAt","updatedAt","accountId","userId","scopes"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/delete-user/callback":{"get":{"tags":["Default"],"description":"Callback to complete user deletion with verification token","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","schema":{"type":"string","description":"The token to verify the deletion request"}},{"name":"callbackURL","in":"query","schema":{"type":"string","description":"The URL to redirect to after deletion"}}],"responses":{"200":{"description":"User successfully deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the deletion was successful"},"message":{"type":"string","enum":["User deleted"],"description":"Confirmation message"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/unlink-account":{"post":{"tags":["Default"],"description":"Unlink an account","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"},"accountId":{"type":"string"}},"required":["providerId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/refresh-token":{"post":{"tags":["Default"],"description":"Refresh the access token using a refresh token","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":"string","description":"The account ID associated with the refresh token"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["providerId"]}}}},"responses":{"200":{"description":"Access token refreshed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/get-access-token":{"post":{"tags":["Default"],"description":"Get a valid access token, doing a refresh if needed","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":"string","description":"The account ID associated with the refresh token"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["providerId"]}}}},"responses":{"200":{"description":"A Valid access token","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/account-info":{"get":{"tags":["Default"],"description":"Get the account info provided by the provider","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":"string"},"emailVerified":{"type":"boolean"}},"required":["id","emailVerified"]},"data":{"type":"object","properties":{},"additionalProperties":true}},"required":["user","data"],"additionalProperties":false}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/ok":{"get":{"tags":["Default"],"description":"Check if the API is working","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API is working","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates if the API is working"}},"required":["ok"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/error":{"get":{"tags":["Default"],"description":"Displays an error page","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","description":"The HTML content of the error page"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-in/username":{"post":{"tags":["Username"],"description":"Sign in with username","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"The username of the user"},"password":{"type":"string","description":"The password of the user"},"rememberMe":{"type":"boolean","description":"Remember the user session"},"callbackURL":{"type":"string","description":"URL to redirect to after sign in (also used as the redirect target for email verification when required)"}},"required":["username","password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"redirect":{"type":"boolean","description":"Whether the client should follow the Location header. True when callbackURL was provided."},"token":{"type":"string","description":"Session token for the authenticated session"},"url":{"type":"string","nullable":true,"description":"The callbackURL echoed back so the client can redirect."},"user":{"$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"422":{"description":"Unprocessable Entity. Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/is-username-available":{"post":{"tags":["Username"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"The username to check"}},"required":["username"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/set-role":{"post":{"tags":["Admin"],"description":"Set the role of a user","operationId":"setUserRole","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"},"role":{"anyOf":[{"type":"string","description":"The role to set. `admin` or `user` by default"},{"type":"array","items":{"type":"string","description":"The roles to set. `admin` or `user` by default"}}],"description":"The role to set, this can be a string or an array of strings. Eg: `admin` or `[admin, user]`"}},"required":["userId","role"]}}}},"responses":{"200":{"description":"User role updated","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/get-user":{"get":{"tags":["Admin"],"description":"Get an existing user","operationId":"getUser","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","schema":{"type":"string","description":"The id of the User"}}],"responses":{"200":{"description":"User","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/create-user":{"post":{"tags":["Admin"],"description":"Create a new user","operationId":"createUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email of the user"},"password":{"type":"string"},"name":{"type":"string","description":"The name of the user"},"role":{"anyOf":[{"type":"string","description":"The role of the user"},{"type":"array","items":{"type":"string","description":"The roles of user"}}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["email","name"]}}}},"responses":{"200":{"description":"User created","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/update-user":{"post":{"tags":["Admin"],"description":"Update a user's details","operationId":"adminUpdateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"},"data":{"type":"object","propertyNames":{},"additionalProperties":{},"description":"The user data to update"}},"required":["userId","data"]}}}},"responses":{"200":{"description":"User updated","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/list-users":{"get":{"tags":["Admin"],"description":"List users","operationId":"listUsers","security":[{"bearerAuth":[]}],"parameters":[{"name":"searchValue","in":"query","schema":{"type":"string"}},{"name":"searchField","in":"query","schema":{"type":"string","enum":["email","name"],"description":"The field to search in, defaults to email. Can be `email` or `name`. Eg: \"name\""}},{"name":"searchOperator","in":"query","schema":{"type":"string","enum":["contains","starts_with","ends_with"],"description":"The operator to use for the search. Can be `contains`, `starts_with` or `ends_with`. Eg: \"contains\""}},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string","description":"The number of users to return"},{"type":"number"}]}},{"name":"offset","in":"query","schema":{"anyOf":[{"type":"string","description":"The offset to start from"},{"type":"number"}]}},{"name":"sortBy","in":"query","schema":{"type":"string","description":"The field to sort by"}},{"name":"sortDirection","in":"query","schema":{"type":"string","enum":["asc","desc"],"description":"The direction to sort by"}},{"name":"filterField","in":"query","schema":{"type":"string","description":"The field to filter by"}},{"name":"filterValue","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","description":"The value to filter by"},{"type":"number"}]},{"type":"boolean"}]},{"type":"array","items":{"type":"string"}}]},{"type":"array","items":{"type":"number"}}]}},{"name":"filterOperator","in":"query","schema":{"type":"string","enum":["eq","ne","lt","lte","gt","gte","in","not_in","contains","starts_with","ends_with"],"description":"The operator to use for the filter"}}],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["users","total"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/list-user-sessions":{"post":{"tags":["Admin"],"description":"List user sessions","operationId":"adminListUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"}},"required":["userId"]}}}},"responses":{"200":{"description":"List of user sessions","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/unban-user":{"post":{"tags":["Admin"],"description":"Unban a user","operationId":"unbanUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"}},"required":["userId"]}}}},"responses":{"200":{"description":"User unbanned","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/ban-user":{"post":{"tags":["Admin"],"description":"Ban a user","operationId":"banUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"},"banReason":{"type":"string","description":"The reason for the ban"},"banExpiresIn":{"type":"number","description":"The number of seconds until the ban expires"}},"required":["userId"]}}}},"responses":{"200":{"description":"User banned","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/impersonate-user":{"post":{"tags":["Admin"],"description":"Impersonate a user","operationId":"impersonateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"}},"required":["userId"]}}}},"responses":{"200":{"description":"Impersonation session created","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/stop-impersonating":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/revoke-user-session":{"post":{"tags":["Admin"],"description":"Revoke a user session","operationId":"revokeUserSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionToken":{"type":"string","description":"The session token"}},"required":["sessionToken"]}}}},"responses":{"200":{"description":"Session revoked","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/revoke-user-sessions":{"post":{"tags":["Admin"],"description":"Revoke all user sessions","operationId":"revokeUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"}},"required":["userId"]}}}},"responses":{"200":{"description":"Sessions revoked","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/remove-user":{"post":{"tags":["Admin"],"description":"Delete a user and all their sessions and accounts. Cannot be undone.","operationId":"removeUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"}},"required":["userId"]}}}},"responses":{"200":{"description":"User removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/set-user-password":{"post":{"tags":["Admin"],"description":"Set a user's password","operationId":"setUserPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","minLength":1,"description":"The new password"},"userId":{"type":"string","minLength":1,"description":"The user id"}},"required":["newPassword","userId"]}}}},"responses":{"200":{"description":"Password set","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/admin/has-permission":{"post":{"tags":["Admin"],"description":"Check if the user has permission","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"type":"object","description":"The permission to check"}},"required":["permissions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/generate-register-options":{"get":{"tags":["Passkey"],"description":"Generate registration options for a new passkey","operationId":"generatePasskeyRegistrationOptions","security":[{"bearerAuth":[]}],"parameters":[{"name":"authenticatorAttachment","in":"query","required":false,"description":"Type of authenticator to use for registration.\n                          \"platform\" for device-specific authenticators,\n                          \"cross-platform\" for authenticators that can be used across devices.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Optional custom name for the passkey.\n                          This can help identify the passkey when managing multiple credentials.","schema":{"type":"string"}},{"name":"context","in":"query","required":false,"description":"Optional context for passkey-first registration flows.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string"},"rp":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"}}},"pubKeyCredParams":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"alg":{"type":"number"}}}},"timeout":{"type":"number"},"excludeCredentials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"transports":{"type":"array","items":{"type":"string"}}}}},"authenticatorSelection":{"type":"object","properties":{"authenticatorAttachment":{"type":"string"},"requireResidentKey":{"type":"boolean"},"userVerification":{"type":"string"}}},"attestation":{"type":"string"},"extensions":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/generate-authenticate-options":{"get":{"tags":["Passkey"],"description":"Generate authentication options for a passkey","operationId":"passkeyGenerateAuthenticateOptions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string"},"rp":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"}}},"timeout":{"type":"number"},"allowCredentials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"transports":{"type":"array","items":{"type":"string"}}}}},"userVerification":{"type":"string"},"authenticatorSelection":{"type":"object","properties":{"authenticatorAttachment":{"type":"string"},"requireResidentKey":{"type":"boolean"},"userVerification":{"type":"string"}}},"extensions":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/verify-registration":{"post":{"tags":["Passkey"],"description":"Verify registration of a new passkey","operationId":"passkeyVerifyRegistration","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{},"name":{"type":"string","description":"Name of the passkey"}},"required":["response"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passkey"}}}},"400":{"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/verify-authentication":{"post":{"tags":["Passkey"],"description":"Verify authentication of a passkey","operationId":"passkeyVerifyAuthentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","propertyNames":{},"additionalProperties":{}}},"required":["response"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/list-user-passkeys":{"get":{"tags":["Passkey"],"description":"List all passkeys for the authenticated user","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Passkeys retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passkey","required":["id","userId","publicKey","createdAt","updatedAt"]},"description":"Array of passkey objects associated with the user"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/delete-passkey":{"post":{"tags":["Passkey"],"description":"Delete a specific passkey","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the passkey to delete. Eg: \"some-passkey-id\""}},"required":["id"]}}}},"responses":{"200":{"description":"Passkey deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates whether the deletion was successful"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/passkey/update-passkey":{"post":{"tags":["Passkey"],"description":"Update a specific passkey's name","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the passkey which will be updated. Eg: \"passkey-id\""},"name":{"type":"string","minLength":1,"description":"The new name which the passkey will be updated to. Eg: \"my-new-passkey-name\""}},"required":["id","name"]}}}},"responses":{"200":{"description":"Passkey updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"passkey":{"$ref":"#/components/schemas/Passkey"}},"required":["passkey"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-in/magic-link":{"post":{"tags":["Magic-link"],"description":"Sign in with magic link","operationId":"signInWithMagicLink","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to send the magic link"},"name":{"type":"string","description":"User display name. Only used if the user is registering for the first time. Eg: \"my-name\""},"callbackURL":{"type":"string","description":"URL to redirect after magic link verification"},"newUserCallbackURL":{"type":"string","description":"URL to redirect after new user signup. Only used if the user is registering for the first time."},"errorCallbackURL":{"type":"string","description":"URL to redirect after error."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Additional metadata to pass to sendMagicLink."}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/magic-link/verify":{"get":{"tags":["Magic-link"],"description":"Verify magic link","operationId":"verifyMagicLink","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","schema":{"type":"string","description":"Verification token"}},{"name":"callbackURL","in":"query","schema":{"type":"string","description":"URL to redirect after magic link verification, if not provided the user will be redirected to the root URL. Eg: \"/dashboard\""}},{"name":"errorCallbackURL","in":"query","schema":{"type":"string","description":"URL to redirect after error."}},{"name":"newUserCallbackURL","in":"query","schema":{"type":"string","description":"URL to redirect after new user signup. Only used if the user is registering for the first time."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/create":{"post":{"tags":["Organization"],"description":"Create an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"userId":{"type":"string","description":"The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\""},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"},"keepCurrentActiveOrganization":{"type":"boolean","description":"Whether to keep the current active organization active after creating a new one. Eg: true"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization that was created","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/update":{"post":{"tags":["Organization"],"description":"Update an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"}}},"organizationId":{"type":"string","description":"The organization ID. Eg: \"org-id\""}},"required":["data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The updated organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/delete":{"post":{"tags":["Organization"],"description":"Delete an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization id to delete"}},"required":["organizationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","description":"The organization id that was deleted"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/set-active":{"post":{"tags":["Organization"],"description":"Set the active organization","operationId":"setActiveOrganization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":["string","null"],"description":"The organization id to set as active. It can be null to unset the active organization. Eg: \"org-id\""},"organizationSlug":{"type":"string","description":"The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\""}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/get-full-organization":{"get":{"tags":["Organization"],"description":"Get the full organization","operationId":"getOrganization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/list":{"get":{"tags":["Organization"],"description":"List all organizations","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/invite-member":{"post":{"tags":["Organization"],"description":"Create an invitation to an organization","operationId":"createOrganizationInvitation","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to invite"},"role":{"anyOf":[{"type":"string","description":"The role to assign to the user"},{"type":"array","items":{"type":"string","description":"The roles to assign to the user"}}],"description":"The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId":{"type":"string","description":"The organization ID to invite the user to"},"resend":{"type":"boolean","description":"Resend the invitation email, if the user is already invited. Eg: true"},"teamId":{"anyOf":[{"type":"string","description":"The team ID to invite the user to"},{"type":"array","items":{"type":"string"},"description":"The team IDs to invite the user to"}]}},"required":["email","role"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","createdAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/cancel-invitation":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to cancel"}},"required":["invitationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/accept-invitation":{"post":{"tags":["Organization"],"description":"Accept an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to accept"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/get-invitation":{"get":{"tags":["Organization"],"description":"Get an invitation by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","schema":{"type":"string","description":"The ID of the invitation to get"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"inviterEmail":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","organizationName","organizationSlug","inviterEmail"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/reject-invitation":{"post":{"tags":["Organization"],"description":"Reject an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to reject"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object","nullable":true}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/list-invitations":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/get-active-member":{"get":{"tags":["Organization"],"description":"Get the member details of the active organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/check-slug":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The organization slug to check. Eg: \"my-org\""}},"required":["slug"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/remove-member":{"post":{"tags":["Organization"],"description":"Remove a member from an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memberIdOrEmail":{"type":"string","description":"The ID or email of the member to remove"},"organizationId":{"type":"string","description":"The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""}},"required":["memberIdOrEmail"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/update-member-role":{"post":{"tags":["Organization"],"description":"Update the role of a member in an organization","operationId":"updateOrganizationMemberRole","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"},"memberId":{"type":"string","description":"The member id to apply the role update to. Eg: \"member-id\""},"organizationId":{"type":"string","description":"An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\""}},"required":["role","memberId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/leave":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization Id for the member to leave. Eg: \"organization-id\""}},"required":["organizationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/list-user-invitations":{"get":{"tags":["Organization"],"description":"List all invitations a user has received","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"inviterId":{"type":"string","description":"The ID of the user who created the invitation"},"teamId":{"type":"string","description":"The ID of the team associated with the invitation","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","organizationName","inviterId","status","expiresAt","createdAt"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/list-members":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/get-active-member-role":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/create-role":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"role":{"type":"string","description":"The name of the role to create"},"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"The permission to assign to the role"},"additionalFields":{"type":"object","properties":{}}},"required":["role","permission"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/delete-role":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"organizationId":{"type":"string"}}},{"anyOf":[{"type":"object","properties":{"roleName":{"type":"string","minLength":1,"description":"The name of the role to delete"}},"required":["roleName"]},{"type":"object","properties":{"roleId":{"type":"string","minLength":1,"description":"The id of the role to delete"}},"required":["roleId"]}]}]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/list-roles":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/get-role":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/update-role":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"organizationId":{"type":"string"},"data":{"type":"object","properties":{"permission":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"roleName":{"type":"string"}}}},"required":["data"]},{"anyOf":[{"type":"object","properties":{"roleName":{"type":"string","minLength":1,"description":"The name of the role to update"}},"required":["roleName"]},{"type":"object","properties":{"roleId":{"type":"string","minLength":1,"description":"The id of the role to update"}},"required":["roleId"]}]}]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/organization/has-permission":{"post":{"tags":["Organization"],"description":"Check if the user has permission","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"object","description":"The permission to check","deprecated":true},"permissions":{"type":"object","description":"The permission to check"}},"required":["permissions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/get-totp-uri":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to get the TOTP URI","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totpURI":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/verify-totp":{"post":{"tags":["Two-factor"],"description":"Verify two factor TOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":"boolean","description":"If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true"}},"required":["code"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/send-otp":{"post":{"tags":["Two-factor"],"description":"Send two factor OTP to the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"trustDevice":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/verify-otp":{"post":{"tags":["Two-factor"],"description":"Verify two factor OTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":"boolean"}},"required":["code"]}}}},"responses":{"200":{"description":"Two-factor OTP verified successfully","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Session token for the authenticated session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the user"},"email":{"type":"string","format":"email","nullable":true,"description":"User's email address"},"emailVerified":{"type":"boolean","nullable":true,"description":"Whether the email is verified"},"name":{"type":"string","nullable":true,"description":"User's name"},"image":{"type":"string","format":"uri","nullable":true,"description":"User's profile image URL"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the user was last updated"}},"required":["id","createdAt","updatedAt"],"description":"The authenticated user object"}},"required":["token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/verify-backup-code":{"post":{"tags":["Two-factor"],"description":"Verify a backup code for two-factor authentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A backup code to verify. Eg: \"123456\""},"disableSession":{"type":"boolean","description":"If true, the session cookie will not be set."},"trustDevice":{"type":"boolean","description":"If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true"}},"required":["code"]}}}},"responses":{"200":{"description":"Backup code verified successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the user"},"email":{"type":"string","format":"email","nullable":true,"description":"User's email address"},"emailVerified":{"type":"boolean","nullable":true,"description":"Whether the email is verified"},"name":{"type":"string","nullable":true,"description":"User's name"},"image":{"type":"string","format":"uri","nullable":true,"description":"User's profile image URL"},"twoFactorEnabled":{"type":"boolean","description":"Whether two-factor authentication is enabled for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the user was last updated"}},"required":["id","twoFactorEnabled","createdAt","updatedAt"],"description":"The authenticated user object with two-factor details"},"session":{"type":"object","properties":{"token":{"type":"string","description":"Session token"},"userId":{"type":"string","description":"ID of the user associated with the session"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the session was created"},"expiresAt":{"type":"string","format":"date-time","description":"Timestamp when the session expires"}},"required":["token","userId","createdAt","expiresAt"],"description":"The current session object, included unless disableSession is true"}},"required":["user","session"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/generate-backup-codes":{"post":{"tags":["Two-factor"],"description":"Generate new backup codes for two-factor authentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The users password."}},"required":["password"]}}}},"responses":{"200":{"description":"Backup codes generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the backup codes were generated successfully","enum":[true]},"backupCodes":{"type":"array","items":{"type":"string"},"description":"Array of generated backup codes in plain text"}},"required":["status","backupCodes"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/enable":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to enable two factor authentication. This will generate a TOTP URI and backup codes. Once the user verifies the TOTP URI, the two factor authentication will be enabled.","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"},"issuer":{"type":"string","description":"Custom issuer for the TOTP URI"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totpURI":{"type":"string","description":"TOTP URI"},"backupCodes":{"type":"array","items":{"type":"string"},"description":"Backup codes"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/two-factor/disable":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to disable two factor authentication.","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/send-verification-otp":{"post":{"tags":["Email-otp"],"description":"Send a verification OTP to an email","operationId":"sendEmailVerificationOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to send the OTP"},"type":{"type":"string","enum":["email-verification","sign-in","forget-password","change-email"],"description":"Type of the OTP"}},"required":["email","type"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/check-verification-otp":{"post":{"tags":["Email-otp"],"description":"Verify an email with an OTP","operationId":"verifyEmailWithOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address the OTP was sent to"},"type":{"type":"string","enum":["email-verification","sign-in","forget-password","change-email"],"description":"Type of the OTP"},"otp":{"type":"string","description":"OTP to verify"}},"required":["email","type","otp"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/verify-email":{"post":{"tags":["Email-otp"],"description":"Verify email with OTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to verify"},"otp":{"type":"string","description":"OTP to verify"}},"required":["email","otp"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the verification was successful","enum":[true]},"token":{"type":"string","nullable":true,"description":"Session token if autoSignInAfterVerification is enabled, otherwise null"},"user":{"$ref":"#/components/schemas/User"}},"required":["status","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/sign-in/email-otp":{"post":{"tags":["Email-otp"],"description":"Sign in with email and OTP","operationId":"signInWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to sign in"},"otp":{"type":"string","description":"OTP sent to the email"},"name":{"type":"string","description":"User display name. Only used if the user is registering for the first time. Eg: \"my-name\""},"image":{"type":"string","description":"User profile image URL. Only used if the user is registering for the first time."}},"required":["email","otp"],"additionalProperties":{},"propertyNames":{"type":"string"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Session token for the authenticated session"},"user":{"$ref":"#/components/schemas/User"}},"required":["token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/request-password-reset":{"post":{"tags":["Email-otp"],"description":"Request password reset with email and OTP","operationId":"requestPasswordResetWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to send the OTP"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the OTP was sent successfully"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/forget-password/email-otp":{"post":{"tags":["Email-otp"],"description":"Deprecated: Use /email-otp/request-password-reset instead.","operationId":"forgetPasswordWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to send the OTP"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the OTP was sent successfully"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/reset-password":{"post":{"tags":["Email-otp"],"description":"Reset password with email and OTP","operationId":"resetPasswordWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to reset the password"},"otp":{"type":"string","description":"OTP sent to the email"},"password":{"type":"string","description":"New password"}},"required":["email","otp","password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/request-email-change":{"post":{"tags":["Email-otp"],"description":"Request email change with verification OTP sent to the new email","operationId":"requestEmailChangeWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"New email address to send the OTP"},"otp":{"type":"string"}},"required":["newEmail"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/auth/email-otp/change-email":{"post":{"tags":["Email-otp"],"description":"Verify new email with OTP and change the email if verification is successful","operationId":"changeEmailWithEmailOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"New email address to verify and change to"},"otp":{"type":"string","description":"OTP sent to the new email"}},"required":["newEmail","otp"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}}}}