{"openapi":"3.0.3","info":{"title":"Eco Wave API","description":"API documentation for Eco Wave, including authentication endpoints.","version":"0.1.0"},"tags":[{"name":"Analytics","description":"Organization delivery, volume, sender, and campaign reporting."},{"name":"Campaigns","description":"Campaign configuration and sender ownership."},{"name":"Bulk SMS","description":"Phonebook-based high-throughput SMS batches."},{"name":"Contacts","description":"Organization contact management and CSV data exchange."},{"name":"Templates","description":"Reusable organization SMS templates and dynamic variables."},{"name":"System","description":"API health and operational endpoints."},{"name":"Better Auth","description":"Authentication, account, and session endpoints."},{"name":"Admin","description":"Administrative user and session management endpoints."},{"name":"Organization","description":"Organization, member, and invitation management endpoints."},{"name":"Messaging","description":"Developer-facing SMS submission and message history."},{"name":"Security Codes","description":"Configurable one-time security code delivery and verification."},{"name":"Developer","description":"Organization API key management."},{"name":"Kannel","description":"Private Kannel delivery callbacks."},{"name":"Inbound","description":"Inbound SMS ingestion, inbox, keyword rules, and redrive."},{"name":"Webhooks","description":"Per-message status webhook delivery, retry, DLQ, and redrive."},{"name":"Notifications","description":"In-app organization notifications and realtime SSE stream."}],"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean","default":false,"readOnly":true},"image":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"role":{"type":"string","readOnly":true},"banned":{"type":"boolean","default":false,"readOnly":true},"banReason":{"type":"string","readOnly":true},"banExpires":{"type":"string","format":"date-time","readOnly":true}},"required":["id","name","email","emailVerified","createdAt","updatedAt"]},"Session":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"expiresAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"impersonatedBy":{"type":"string","readOnly":true},"activeOrganizationId":{"type":"string","readOnly":true}},"required":["id","expiresAt","token","createdAt","updatedAt","userId"]},"Account":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","providerId","userId","createdAt","updatedAt"]},"Verification":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","identifier","value","expiresAt","createdAt","updatedAt"]},"Organization":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"metadata":{"type":"string"}},"required":["id","name","slug","createdAt"]},"Member":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","default":"member"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","userId","role","createdAt"]},"Invitation":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","default":"pending"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"inviterId":{"type":"string"}},"required":["id","organizationId","email","status","expiresAt","createdAt","inviterId"]}},"securitySchemes":{"apiKeyCookie":{"type":"apiKey","in":"cookie","name":"apiKeyCookie","description":"API Key authentication via cookie"},"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication"}}},"paths":{"/health":{"get":{"tags":["System"],"summary":"Check API health","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"const":"ok","type":"string"}}}}}}},"operationId":"getHealth"}},"/api/v1/organizations/invitations":{"get":{"tags":["Organization"],"summary":"List invitations for the authenticated user","operationId":"getApiV1OrganizationsInvitations"}},"/api/v1/api-keys/":{"get":{"tags":["Developer"],"summary":"List organization API keys","parameters":[{"name":"organizationId","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"getApiV1Api-keys"},"post":{"tags":["Developer"],"summary":"Create an organization API key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name","environment","permissions"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"environment":{"type":"string","enum":["test","live"]},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"format":"date-time","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name","environment","permissions"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"environment":{"type":"string","enum":["test","live"]},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"format":"date-time","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name","environment","permissions"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"environment":{"type":"string","enum":["test","live"]},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"format":"date-time","type":"string"}}}}}},"operationId":"postApiV1Api-keys"}},"/api/v1/api-keys/{keyId}":{"patch":{"tags":["Developer"],"summary":"Update API key metadata and permissions","parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":80,"type":"string"},"permissions":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["messages:send","messages:read","security-codes:send","security-codes:verify","schedules:write","schedules:read","contacts:write","contacts:read","contacts:verify","contacts:import","contacts:export","phonebooks:write","phonebooks:read","templates:write","templates:read","campaigns:write","campaigns:read","bulk:write","bulk:read","bulk:export","analytics:read","analytics:export","sender-ids:read","sender-ids:write","inbound:read","inbound:write","webhooks:read","webhooks:write"]}},"metadata":{"type":"object","properties":{"service":{"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"},"tags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}},"expiresAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}}}}}},"operationId":"patchApiV1Api-keysByKeyId"},"delete":{"tags":["Developer"],"summary":"Revoke an API key","parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1Api-keysByKeyId"}},"/api/v1/analytics/":{"get":{"tags":["Analytics"],"summary":"Get organization messaging analytics","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Analytics"}},"/api/v1/analytics/export":{"get":{"tags":["Analytics"],"summary":"Export organization analytics as CSV","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"report","in":"query","required":false,"schema":{"type":"string","enum":["messages","daily","senders","campaigns"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"sender","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AnalyticsExport"}},"/api/v1/contact-lists/":{"get":{"tags":["Contacts"],"summary":"List organization phonebooks","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Contact-lists"},"post":{"tags":["Contacts"],"summary":"Create a phonebook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}}}},"operationId":"postApiV1Contact-lists"}},"/api/v1/contact-lists/{listId}":{"patch":{"tags":["Contacts"],"summary":"Update a phonebook","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":500,"type":"string"}}}}}},"operationId":"patchApiV1Contact-listsByListId"},"delete":{"tags":["Contacts"],"summary":"Delete a phonebook","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1Contact-listsByListId"}},"/api/v1/contact-lists/{listId}/members":{"get":{"tags":["Contacts"],"summary":"List phonebook contacts","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Contact-listsByListIdMembers"},"put":{"tags":["Contacts"],"summary":"Replace phonebook contacts","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","contactIds"],"properties":{"organizationId":{"type":"string"},"contactIds":{"maxItems":100000,"type":"array","items":{"type":"string"}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","contactIds"],"properties":{"organizationId":{"type":"string"},"contactIds":{"maxItems":100000,"type":"array","items":{"type":"string"}}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","contactIds"],"properties":{"organizationId":{"type":"string"},"contactIds":{"maxItems":100000,"type":"array","items":{"type":"string"}}}}}}},"operationId":"putApiV1Contact-listsByListIdMembers"}},"/api/v1/contacts/":{"get":{"tags":["Contacts"],"summary":"List organization contacts","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"format":"date","type":"string"}},{"name":"to","in":"query","required":false,"schema":{"format":"date","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Contacts"},"post":{"tags":["Contacts"],"summary":"Create a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}},"operationId":"postApiV1Contacts"}},"/api/v1/contacts/{contactId}":{"patch":{"tags":["Contacts"],"summary":"Update a contact","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","phoneNumber"],"properties":{"organizationId":{"type":"string"},"phoneNumber":{"minLength":8,"maxLength":16,"type":"string"},"firstName":{"maxLength":100,"type":"string"},"lastName":{"maxLength":100,"type":"string"},"email":{"maxLength":320,"type":"string"},"company":{"maxLength":160,"type":"string"},"tags":{"maxItems":100,"type":"array","items":{"maxLength":80,"type":"string"}},"customFields":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}},"operationId":"patchApiV1ContactsByContactId"},"delete":{"tags":["Contacts"],"summary":"Delete a contact","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1ContactsByContactId"}},"/api/v1/contacts/{contactId}/verification/request":{"post":{"tags":["Contacts"],"summary":"Request a contact phone verification OTP","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}}}},"operationId":"postApiV1ContactsByContactIdVerificationRequest"}},"/api/v1/contacts/{contactId}/verification/confirm":{"post":{"tags":["Contacts"],"summary":"Verify a contact phone OTP","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","code"],"properties":{"organizationId":{"type":"string"},"code":{"pattern":"^[0-9]{6}$","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","code"],"properties":{"organizationId":{"type":"string"},"code":{"pattern":"^[0-9]{6}$","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","code"],"properties":{"organizationId":{"type":"string"},"code":{"pattern":"^[0-9]{6}$","type":"string"}}}}}},"operationId":"postApiV1ContactsByContactIdVerificationConfirm"}},"/api/v1/contacts/import":{"post":{"tags":["Contacts"],"summary":"Import contacts from CSV","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","file"],"properties":{"organizationId":{"type":"string"},"file":{"default":"File","type":"string","format":"binary"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","file"],"properties":{"organizationId":{"type":"string"},"file":{"default":"File","type":"string","format":"binary"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","file"],"properties":{"organizationId":{"type":"string"},"file":{"default":"File","type":"string","format":"binary"}}}}}},"operationId":"postApiV1ContactsImport"}},"/api/v1/contacts/export":{"get":{"tags":["Contacts"],"summary":"Export contacts as CSV","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"format":"date","type":"string"}},{"name":"to","in":"query","required":false,"schema":{"format":"date","type":"string"}}],"operationId":"getApiV1ContactsExport"}},"/api/v1/campaigns/":{"get":{"tags":["Campaigns"],"summary":"List campaigns","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Campaigns"},"post":{"tags":["Campaigns"],"summary":"Create a campaign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}}}},"operationId":"postApiV1Campaigns"}},"/api/v1/campaigns/{campaignId}":{"patch":{"tags":["Campaigns"],"summary":"Update a campaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"description":{"maxLength":1000,"type":"string"},"sender":{"minLength":1,"maxLength":20,"type":"string"},"status":{"type":"string","enum":["active","paused","archived"]}}}}}},"operationId":"patchApiV1CampaignsByCampaignId"},"delete":{"tags":["Campaigns"],"summary":"Delete a campaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1CampaignsByCampaignId"}},"/api/v1/bulk-sms/":{"get":{"tags":["Bulk SMS"],"summary":"List bulk SMS batches","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Bulk-sms"},"post":{"tags":["Bulk SMS"],"summary":"Submit bulk SMS to a phonebook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["campaignId","contactListId","text"],"properties":{"organizationId":{"type":"string"},"campaignId":{"type":"string"},"contactListId":{"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["campaignId","contactListId","text"],"properties":{"organizationId":{"type":"string"},"campaignId":{"type":"string"},"contactListId":{"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["campaignId","contactListId","text"],"properties":{"organizationId":{"type":"string"},"campaignId":{"type":"string"},"contactListId":{"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"scheduledAt":{"format":"date-time","type":"string"}}}}}},"operationId":"postApiV1Bulk-sms"}},"/api/v1/bulk-sms/{bulkSmsId}":{"get":{"tags":["Bulk SMS"],"summary":"Get bulk SMS details","parameters":[{"name":"bulkSmsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Bulk-smsByBulkSmsId"},"delete":{"tags":["Bulk SMS"],"summary":"Cancel pending bulk SMS","parameters":[{"name":"bulkSmsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1Bulk-smsByBulkSmsId"}},"/api/v1/bulk-sms/{bulkSmsId}/messages":{"get":{"tags":["Bulk SMS"],"summary":"List messages in a bulk SMS batch","parameters":[{"name":"bulkSmsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Bulk-smsByBulkSmsIdMessages"}},"/api/v1/bulk-sms/{bulkSmsId}/messages/export":{"get":{"tags":["Bulk SMS"],"summary":"Export messages in a bulk SMS batch","parameters":[{"name":"bulkSmsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Bulk-smsByBulkSmsIdMessagesExport"}},"/api/v1/bulk-sms/{bulkSmsId}/start":{"patch":{"tags":["Bulk SMS"],"summary":"Start a scheduled bulk SMS immediately","parameters":[{"name":"bulkSmsId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}}}},"operationId":"patchApiV1Bulk-smsByBulkSmsIdStart"}},"/api/v1/templates/":{"get":{"tags":["Templates"],"summary":"List organization SMS templates","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Templates"},"post":{"tags":["Templates"],"summary":"Create an SMS template","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}}}},"operationId":"postApiV1Templates"}},"/api/v1/templates/{templateId}":{"patch":{"tags":["Templates"],"summary":"Update an SMS template","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId","name","content"],"properties":{"organizationId":{"type":"string"},"name":{"minLength":1,"maxLength":100,"type":"string"},"content":{"minLength":1,"maxLength":4800,"type":"string"},"category":{"type":"string","enum":["general","marketing","notification","otp","reminder"]},"scope":{"type":"string","enum":["team","personal"]}}}}}},"operationId":"patchApiV1TemplatesByTemplateId"},"delete":{"tags":["Templates"],"summary":"Delete an SMS template","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1TemplatesByTemplateId"}},"/api/v1/sender-ids":{"get":{"tags":["Sender IDs"],"summary":"List organization sender IDs","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Sender-ids"},"post":{"tags":["Sender IDs"],"summary":"Request sender ID approval","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}}}},"operationId":"postApiV1Sender-ids"}},"/api/v1/sender-ids/{senderId}":{"patch":{"tags":["Sender IDs"],"summary":"Resubmit a rejected sender ID","parameters":[{"name":"senderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["value","useCase","sampleMessage"],"properties":{"organizationId":{"type":"string"},"value":{"minLength":3,"maxLength":20,"type":"string"},"useCase":{"minLength":10,"maxLength":1000,"type":"string"},"sampleMessage":{"minLength":1,"maxLength":1600,"type":"string"},"website":{"maxLength":500,"type":"string"}}}}}},"operationId":"patchApiV1Sender-idsBySenderId"},"delete":{"tags":["Sender IDs"],"summary":"Delete an unapproved sender ID","parameters":[{"name":"senderId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1Sender-idsBySenderId"}},"/api/v1/admin/sender-ids":{"get":{"tags":["Admin"],"summary":"List sender ID approval requests","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminSender-ids"}},"/api/v1/admin/sender-ids/{senderId}/review":{"patch":{"tags":["Admin"],"summary":"Approve or reject a sender ID","parameters":[{"name":"senderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["approve","reject"]},"reason":{"maxLength":1000,"type":"string"},"isDefault":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["approve","reject"]},"reason":{"maxLength":1000,"type":"string"},"isDefault":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["approve","reject"]},"reason":{"maxLength":1000,"type":"string"},"isDefault":{"type":"boolean"}}}}}},"operationId":"patchApiV1AdminSender-idsBySenderIdReview"}},"/api/v1/inbound/keywords":{"get":{"tags":["Inbound"],"summary":"List inbound keyword rules","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1InboundKeywords"},"post":{"tags":["Inbound"],"summary":"Create an inbound keyword auto-reply","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["keyword","response"],"properties":{"organizationId":{"type":"string"},"keyword":{"minLength":1,"maxLength":100,"type":"string"},"response":{"minLength":1,"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["keyword","response"],"properties":{"organizationId":{"type":"string"},"keyword":{"minLength":1,"maxLength":100,"type":"string"},"response":{"minLength":1,"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["keyword","response"],"properties":{"organizationId":{"type":"string"},"keyword":{"minLength":1,"maxLength":100,"type":"string"},"response":{"minLength":1,"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}}}},"operationId":"postApiV1InboundKeywords"}},"/api/v1/inbound/keywords/{keywordId}":{"patch":{"tags":["Inbound"],"summary":"Update an inbound keyword rule","parameters":[{"name":"keywordId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"keyword":{"maxLength":100,"type":"string"},"response":{"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"keyword":{"maxLength":100,"type":"string"},"response":{"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"},"keyword":{"maxLength":100,"type":"string"},"response":{"maxLength":1600,"type":"string"},"matchType":{"type":"string","enum":["exact","starts_with","contains"]},"sender":{"maxLength":20,"type":"string"},"enabled":{"type":"boolean"}}}}}},"operationId":"patchApiV1InboundKeywordsByKeywordId"},"delete":{"tags":["Inbound"],"summary":"Delete an inbound keyword rule","parameters":[{"name":"keywordId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1InboundKeywordsByKeywordId"}},"/api/v1/inbound/messages":{"get":{"tags":["Inbound"],"summary":"List inbound messages","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1InboundMessages"}},"/api/v1/inbound/messages/{messageId}/redrive":{"post":{"tags":["Inbound"],"summary":"Redrive a failed inbound message","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}}}},"operationId":"postApiV1InboundMessagesByMessageIdRedrive"}},"/api/v1/kannel/mo":{"get":{"tags":["Kannel"],"summary":"Receive a Kannel mobile-originated SMS","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"minLength":1,"maxLength":32,"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"minLength":1,"maxLength":32,"type":"string"}},{"name":"text","in":"query","required":true,"schema":{"minLength":1,"maxLength":1600,"type":"string"}},{"name":"smscId","in":"query","required":false,"schema":{"maxLength":100,"type":"string"}},{"name":"providerMessageId","in":"query","required":false,"schema":{"maxLength":200,"type":"string"}},{"name":"timestamp","in":"query","required":false,"schema":{"maxLength":100,"type":"string"}}],"operationId":"getApiV1KannelMo"}},"/api/v1/webhook-deliveries":{"get":{"tags":["Webhooks"],"summary":"List status webhook deliveries and DLQ entries","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Webhook-deliveries"}},"/api/v1/webhook-deliveries/{deliveryId}/redrive":{"post":{"tags":["Webhooks"],"summary":"Redrive a webhook from the DLQ","parameters":[{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"organizationId":{"type":"string"}}}}}},"operationId":"postApiV1Webhook-deliveriesByDeliveryIdRedrive"}},"/api/v1/admin/webhook-deliveries":{"get":{"tags":["Admin"],"summary":"List webhook deliveries across organizations","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1AdminWebhook-deliveries"}},"/api/v1/admin/webhook-deliveries/{deliveryId}/redrive":{"post":{"tags":["Admin"],"summary":"Redrive any webhook DLQ entry","parameters":[{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"postApiV1AdminWebhook-deliveriesByDeliveryIdRedrive"}},"/api/v1/notifications/":{"get":{"tags":["Notifications"],"summary":"List in-app notifications","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Notifications"}},"/api/v1/notifications/{notificationId}/read":{"patch":{"tags":["Notifications"],"summary":"Mark a notification as read","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"patchApiV1NotificationsByNotificationIdRead"}},"/api/v1/notifications/read-all":{"post":{"tags":["Notifications"],"summary":"Mark all notifications as read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}}}}}},"operationId":"postApiV1NotificationsRead-all"}},"/api/v1/notifications/stream":{"get":{"tags":["Notifications"],"summary":"Realtime notification stream (SSE)","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1NotificationsStream"}},"/api/v1/security-codes/send":{"post":{"tags":["Security Codes"],"summary":"Send a security code","description":"Generates and sends a configurable one-time code by SMS. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"channel":{"const":"sms","type":"string"},"purpose":{"minLength":1,"maxLength":64,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"code":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","alphanumeric"]},"length":{"minimum":4,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":4,"maximum":10,"type":"integer"}]}}},"ttlSeconds":{"minimum":60,"maximum":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":60,"maximum":1800,"type":"integer"}]},"maxAttempts":{"minimum":1,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":10,"type":"integer"}]},"template":{"minLength":1,"maxLength":1600,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["to"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"channel":{"const":"sms","type":"string"},"purpose":{"minLength":1,"maxLength":64,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"code":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","alphanumeric"]},"length":{"minimum":4,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":4,"maximum":10,"type":"integer"}]}}},"ttlSeconds":{"minimum":60,"maximum":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":60,"maximum":1800,"type":"integer"}]},"maxAttempts":{"minimum":1,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":10,"type":"integer"}]},"template":{"minLength":1,"maxLength":1600,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["to"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"channel":{"const":"sms","type":"string"},"purpose":{"minLength":1,"maxLength":64,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"code":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","alphanumeric"]},"length":{"minimum":4,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":4,"maximum":10,"type":"integer"}]}}},"ttlSeconds":{"minimum":60,"maximum":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":60,"maximum":1800,"type":"integer"}]},"maxAttempts":{"minimum":1,"maximum":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":10,"type":"integer"}]},"template":{"minLength":1,"maxLength":1600,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}},"operationId":"postApiV1Security-codesSend"}},"/api/v1/security-codes/verify":{"post":{"tags":["Security Codes"],"summary":"Verify a security code","description":"Checks a code once and enforces its expiration and maximum attempt count.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["verificationId","code"],"properties":{"organizationId":{"type":"string"},"verificationId":{"minLength":1,"maxLength":100,"type":"string"},"code":{"minLength":4,"maxLength":10,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["verificationId","code"],"properties":{"organizationId":{"type":"string"},"verificationId":{"minLength":1,"maxLength":100,"type":"string"},"code":{"minLength":4,"maxLength":10,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["verificationId","code"],"properties":{"organizationId":{"type":"string"},"verificationId":{"minLength":1,"maxLength":100,"type":"string"},"code":{"minLength":4,"maxLength":10,"type":"string"}}}}}},"operationId":"postApiV1Security-codesVerify"}},"/api/v1/messages":{"post":{"tags":["Messaging"],"summary":"Send an SMS message","description":"Accepts a message for delivery through the configured Kannel transport. Supports Idempotency-Key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","text"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"webhook":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":2048,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["to","text"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"webhook":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":2048,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["to","text"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"webhook":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"maxLength":2048,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"}}}}}}}},"operationId":"postApiV1Messages"},"get":{"tags":["Messaging"],"summary":"List messages","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Messages"}},"/api/v1/messages/schedule":{"post":{"tags":["Messaging"],"summary":"Schedule a one-time or recurring SMS","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","text","scheduleType","startsAt"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"scheduleType":{"type":"string","enum":["once","recurring"]},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"},"timezone":{"maxLength":100,"type":"string"},"recurrence":{"type":"object","required":["unit","interval"],"properties":{"unit":{"type":"string","enum":["minute","hour","day","week","month","year"]},"interval":{"minimum":1,"maximum":1000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":1000,"type":"integer"}]}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["to","text","scheduleType","startsAt"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"scheduleType":{"type":"string","enum":["once","recurring"]},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"},"timezone":{"maxLength":100,"type":"string"},"recurrence":{"type":"object","required":["unit","interval"],"properties":{"unit":{"type":"string","enum":["minute","hour","day","week","month","year"]},"interval":{"minimum":1,"maximum":1000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":1000,"type":"integer"}]}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["to","text","scheduleType","startsAt"],"properties":{"organizationId":{"type":"string"},"to":{"minLength":8,"maxLength":16,"type":"string"},"text":{"minLength":1,"maxLength":1600,"type":"string"},"from":{"minLength":1,"maxLength":20,"type":"string"},"scheduleType":{"type":"string","enum":["once","recurring"]},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"},"timezone":{"maxLength":100,"type":"string"},"recurrence":{"type":"object","required":["unit","interval"],"properties":{"unit":{"type":"string","enum":["minute","hour","day","week","month","year"]},"interval":{"minimum":1,"maximum":1000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":1000,"type":"integer"}]}}}}}}}},"operationId":"postApiV1MessagesSchedule"}},"/api/v1/message-schedules":{"get":{"tags":["Messaging"],"summary":"List message schedules","parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1Message-schedules"}},"/api/v1/message-schedules/{scheduleId}/status":{"patch":{"tags":["Messaging"],"summary":"Pause, resume, or stop a message schedule","parameters":[{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"organizationId":{"type":"string"},"action":{"type":"string","enum":["pause","resume","cancel"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["action"],"properties":{"organizationId":{"type":"string"},"action":{"type":"string","enum":["pause","resume","cancel"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["action"],"properties":{"organizationId":{"type":"string"},"action":{"type":"string","enum":["pause","resume","cancel"]}}}}}},"operationId":"patchApiV1Message-schedulesByScheduleIdStatus"}},"/api/v1/message-schedules/{scheduleId}":{"delete":{"tags":["Messaging"],"summary":"Permanently delete a message schedule","parameters":[{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"deleteApiV1Message-schedulesByScheduleId"}},"/api/v1/messages/{messageId}":{"get":{"tags":["Messaging"],"summary":"Get a message","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1MessagesByMessageId"}},"/api/v1/kannel/dlr":{"get":{"tags":["Kannel"],"summary":"Receive a Kannel delivery report","parameters":[{"name":"messageId","in":"query","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":true,"schema":{"type":"string"}},{"name":"smscId","in":"query","required":false,"schema":{"type":"string"}},{"name":"providerMessageId","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"operationId":"getApiV1KannelDlr"}},"/api/auth/sign-in/social":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/callback/{id}":{"get":{"tags":["Better Auth"],"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":["Better Auth"],"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."}}}},"/api/auth/get-session":{"get":{"tags":["Better Auth"],"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":["Better Auth"],"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."}}}},"/api/auth/sign-out":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/sign-up/email":{"post":{"tags":["Better Auth"],"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`."}},"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."}}}},"/api/auth/sign-in/email":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/reset-password":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/verify-password":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/verify-email":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/send-verification-email":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/change-email":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/change-password":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/update-session":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/update-user":{"post":{"tags":["Better Auth"],"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}}}}}},"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."}}}},"/api/auth/delete-user":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/request-password-reset":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/reset-password/{token}":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/list-sessions":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/revoke-session":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/revoke-sessions":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/revoke-other-sessions":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/link-social":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/list-accounts":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/delete-user/callback":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/unlink-account":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/refresh-token":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/get-access-token":{"post":{"tags":["Better Auth"],"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."}}}},"/api/auth/account-info":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/ok":{"get":{"tags":["Better Auth"],"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."}}}},"/api/auth/error":{"get":{"tags":["Better Auth"],"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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}},"/api/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."}}}}}}