{"openapi":"3.1.0","info":{"title":"SL Tools API","version":"1.0.0","description":"OpenAPI documentation for SL public and creator APIs."},"security":[],"paths":{"/sign-in/social":{"post":{"tags":["Default"],"description":"Sign in with a social provider","operationId":"socialSignIn","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":["string","null"],"description":"Callback URL to redirect to after the user has signed in"},"newUserCallbackURL":{"type":["string","null"]},"errorCallbackURL":{"type":["string","null"],"description":"Callback URL to redirect to if an error happens"},"provider":{"type":"string"},"disableRedirect":{"type":["boolean","null"],"description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"idToken":{"type":["object","null"],"properties":{"token":{"type":"string","description":"ID token from the provider"},"nonce":{"type":["string","null"],"description":"Nonce used to generate the token"},"accessToken":{"type":["string","null"],"description":"Access token from the provider"},"refreshToken":{"type":["string","null"],"description":"Refresh token from the provider"},"expiresAt":{"type":["number","null"],"description":"Expiry date of the token"},"user":{"type":["object","null"],"properties":{"name":{"type":["object","null"],"properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]}}},"email":{"type":["string","null"]}},"description":"The user object from the provider. Only available for some providers like Apple."}},"required":["token"]},"scopes":{"type":["array","null"],"description":"Array of scopes to request from the provider. This will override the default scopes passed."},"requestSignUp":{"type":["boolean","null"],"description":"Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider"},"loginHint":{"type":["string","null"],"description":"The login hint to use for the authorization code request"},"additionalData":{"type":["string","null"]}},"required":["provider"]}}}},"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":{"token":{"type":"string"},"user":{"type":"object","$ref":"#/components/schemas/User"},"url":{"type":"string"},"redirect":{"type":"boolean","enum":[false]}},"required":["redirect","token","user"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/callback/{id}":{"get":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"post":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/get-session":{"get":{"tags":["Default"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"post":{"tags":["Default"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/sign-out":{"post":{"tags":["Default"],"description":"Sign out the current user","operationId":"signOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/sign-up/email":{"post":{"tags":["Default"],"description":"Sign up a user using email and password","operationId":"signUpWithEmailAndPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"image":{"type":"string","description":"The profile image URL of the user"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"422":{"description":"Unprocessable Entity. User already exists or failed to create user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/sign-in/email":{"post":{"tags":["Default"],"description":"Sign in with email and password","operationId":"signInEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":["string","null"],"description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":["boolean","null"],"description":"If this is false, the session will not be remembered. Default is `true`.","default":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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/reset-password":{"post":{"tags":["Default"],"description":"Reset the password for a user","operationId":"resetPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":["string","null"],"description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/verify-password":{"post":{"tags":["Default"],"description":"Verify the current user's password","operationId":"verifyPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The password to verify"}},"required":["password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/verify-email":{"get":{"tags":["Default"],"description":"Verify the email of the user","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","description":"The token to verify the email","required":true,"schema":{"type":"string"}},{"name":"callbackURL","in":"query","description":"The URL to redirect to after email verification","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the email was verified successfully"}},"required":["user","status"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/send-verification-email":{"post":{"tags":["Default"],"description":"Send a verification email to the user","operationId":"sendVerificationEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email to send the verification email to","example":"user@example.com"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback","example":"https://example.com/callback","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the email was sent successfully","example":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Verification email isn't enabled"}}}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/change-email":{"post":{"tags":["Default"],"operationId":"changeEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"The new email address to set must be a valid email address"},"callbackURL":{"type":["string","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/change-password":{"post":{"tags":["Default"],"description":"Change the password of the user","operationId":"changePassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"currentPassword":{"type":"string","description":"The current password is required"},"revokeOtherSessions":{"type":["boolean","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/update-session":{"post":{"tags":["Default"],"description":"Update the current session","operationId":"updateSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","$ref":"#/components/schemas/Session"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/update-user":{"post":{"tags":["Default"],"description":"Update the current user","operationId":"updateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","description":"The image of the user","nullable":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/delete-user":{"post":{"tags":["Default"],"description":"Delete the user","operationId":"deleteUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The callback URL to redirect to after the user is deleted"},"password":{"type":"string","description":"The user's password. Required if session is not fresh"},"token":{"type":"string","description":"The deletion verification token"}}}}}},"responses":{"200":{"description":"User deletion processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"message":{"type":"string","enum":["User deleted","Verification email sent"],"description":"Status message of the deletion process"}},"required":["success","message"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/request-password-reset":{"post":{"tags":["Default"],"description":"Send a password reset email to the user","operationId":"requestPasswordReset","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":["string","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/reset-password/{token}":{"get":{"tags":["Default"],"description":"Redirects the user to the callback URL with the token","operationId":"resetPasswordCallback","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/list-sessions":{"get":{"tags":["Default"],"description":"List all active sessions for the user","operationId":"listUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/revoke-session":{"post":{"tags":["Default"],"description":"Revoke a single session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the session was revoked successfully"}},"required":["status"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/revoke-sessions":{"post":{"tags":["Default"],"description":"Revoke all sessions for the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all sessions were revoked successfully"}},"required":["status"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/revoke-other-sessions":{"post":{"tags":["Default"],"description":"Revoke all other sessions for the user except the current one","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all other sessions were revoked successfully"}},"required":["status"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/link-social":{"post":{"tags":["Default"],"description":"Link a social account to the user","operationId":"linkSocialAccount","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":["string","null"],"description":"The URL to redirect to after the user has signed in"},"provider":{"type":"string"},"idToken":{"type":["object","null"],"properties":{"token":{"type":"string"},"nonce":{"type":["string","null"]},"accessToken":{"type":["string","null"]},"refreshToken":{"type":["string","null"]},"scopes":{"type":["array","null"]}},"required":["token"]},"requestSignUp":{"type":["boolean","null"]},"scopes":{"type":["array","null"],"description":"Additional scopes to request from the provider"},"errorCallbackURL":{"type":["string","null"],"description":"The URL to redirect to if there is an error during the link process"},"disableRedirect":{"type":["boolean","null"],"description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"additionalData":{"type":["string","null"]}},"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/list-accounts":{"get":{"tags":["Default"],"description":"List all accounts linked to the user","operationId":"listUserAccounts","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountId":{"type":"string"},"userId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","providerId","createdAt","updatedAt","accountId","userId","scopes"]}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/delete-user/callback":{"get":{"tags":["Default"],"description":"Callback to complete user deletion with verification token","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","schema":{"type":"string","description":"The token to verify the deletion request"}},{"name":"callbackURL","in":"query","schema":{"type":["string","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/unlink-account":{"post":{"tags":["Default"],"description":"Unlink an account","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"},"accountId":{"type":["string","null"]}},"required":["providerId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/refresh-token":{"post":{"tags":["Default"],"description":"Refresh the access token using a refresh token","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":["string","null"],"description":"The account ID associated with the refresh token"},"userId":{"type":["string","null"],"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":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/get-access-token":{"post":{"tags":["Default"],"description":"Get a valid access token, doing a refresh if needed","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","description":"The provider ID for the OAuth provider"},"accountId":{"type":["string","null"],"description":"The account ID associated with the refresh token"},"userId":{"type":["string","null"],"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":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/account-info":{"get":{"tags":["Default"],"description":"Get the account info provided by the provider","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":"string"},"emailVerified":{"type":"boolean"}},"required":["id","emailVerified"]},"data":{"type":"object","properties":{},"additionalProperties":true}},"required":["user","data"],"additionalProperties":false}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/ok":{"get":{"tags":["Default"],"description":"Check if the API is working","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API is working","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates if the API is working"}},"required":["ok"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/error":{"get":{"tags":["Default"],"description":"Displays an error page","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","description":"The HTML content of the error page"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"},"userId":{"type":["string","null"],"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":["string","null"],"description":"The metadata of the organization"},"keepCurrentActiveOrganization":{"type":["boolean","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","null"],"description":"The name of the organization"},"slug":{"type":["string","null"],"description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":["string","null"],"description":"The metadata of the organization"}}},"organizationId":{"type":["string","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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"]},"organizationSlug":{"type":["string","null"],"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\""}},"required":[]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"type":"string","description":"The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId":{"type":["string","null"],"description":"The organization ID to invite the user to"},"resend":{"type":["boolean","null"],"description":"Resend the invitation email, if the user is already invited. Eg: true"},"teamId":{"type":"string"}},"required":["email","role","teamId"]}}}},"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/list-invitations":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"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","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/list-members":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/get-active-member-role":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/create-team":{"post":{"tags":["Organization"],"description":"Create a new team within an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team. Eg: \"my-team\""},"organizationId":{"type":["string","null"],"description":"The organization ID which the team will be created in. Defaults to the active organization. Eg: \"organization-id\""}},"required":["name"]}}}},"responses":{"200":{"description":"Team created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the created team"},"name":{"type":"string","description":"Name of the team"},"organizationId":{"type":"string","description":"ID of the organization the team belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the team was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the team was last updated"}},"required":["id","name","organizationId","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/list-teams":{"get":{"tags":["Organization"],"description":"List all teams in an organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Teams retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the team"},"name":{"type":"string","description":"Name of the team"},"organizationId":{"type":"string","description":"ID of the organization the team belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the team was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the team was last updated"}},"required":["id","name","organizationId","createdAt","updatedAt"]},"description":"Array of team objects within the organization"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/remove-team":{"post":{"tags":["Organization"],"description":"Remove a team from an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"The team ID of the team to remove. Eg: \"team-id\""},"organizationId":{"type":["string","null"],"description":"The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: \"organization-id\""}},"required":["teamId"]}}}},"responses":{"200":{"description":"Team removed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message indicating successful removal","enum":["Team removed successfully."]}},"required":["message"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/update-team":{"post":{"tags":["Organization"],"description":"Update an existing team in an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"The ID of the team to be updated. Eg: \"team-id\""},"data":{"type":"object","properties":{"id":{"type":["string","null"],"default":"5iHZtiDdzygvsBMh6dfZGqgg46HFIBDU"},"name":{"type":["string","null"]},"organizationId":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}}}},"required":["teamId","data"]}}}},"responses":{"200":{"description":"Team updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the updated team"},"name":{"type":"string","description":"Updated name of the team"},"organizationId":{"type":"string","description":"ID of the organization the team belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the team was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the team was last updated"}},"required":["id","name","organizationId","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/set-active-team":{"post":{"tags":["Organization"],"description":"Set the active team","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":["string","null"]}},"required":[]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The team","$ref":"#/components/schemas/Team"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/list-user-teams":{"get":{"tags":["Organization"],"description":"List all teams that the current user is a part of.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Teams retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"The team","$ref":"#/components/schemas/Team"},"description":"Array of team objects within the organization"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/list-team-members":{"get":{"tags":["Organization"],"description":"List the members of the given team.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Teams retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"The team member","properties":{"id":{"type":"string","description":"Unique identifier of the team member"},"userId":{"type":"string","description":"The user ID of the team member"},"teamId":{"type":"string","description":"The team ID of the team the team member is in"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the team member was created"}},"required":["id","userId","teamId","createdAt"]},"description":"Array of team member objects within the team"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/add-team-member":{"post":{"tags":["Organization"],"description":"The newly created member","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"The team the user should be a member of."},"userId":{"type":"string","description":"The user Id which represents the user to be added as a member."},"organizationId":{"type":["string","null"],"description":"The organization ID which the team falls under. If not provided, it will default to the user's active organization."}},"required":["teamId","userId"]}}}},"responses":{"200":{"description":"Team member created successfully","content":{"application/json":{"schema":{"type":"object","description":"The team member","properties":{"id":{"type":"string","description":"Unique identifier of the team member"},"userId":{"type":"string","description":"The user ID of the team member"},"teamId":{"type":"string","description":"The team ID of the team the team member is in"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the team member was created"}},"required":["id","userId","teamId","createdAt"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/organization/remove-team-member":{"post":{"tags":["Organization"],"description":"Remove a member from a team","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"The team the user should be removed from."},"userId":{"type":"string","description":"The user which should be removed from the team."},"organizationId":{"type":["string","null"],"description":"The organization ID which the team falls under. If not provided, it will default to the user's active organization."}},"required":["teamId","userId"]}}}},"responses":{"200":{"description":"Team member removed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message indicating successful removal","enum":["Team member removed successfully."]}},"required":["message"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/get-totp-uri":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to get the TOTP URI","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totpURI":{"type":"string"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/verify-totp":{"post":{"tags":["Two-factor"],"description":"Verify two factor TOTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":["boolean","null"],"description":"If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true"}},"required":["code"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/send-otp":{"post":{"tags":["Two-factor"],"description":"Send two factor OTP to the user","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/verify-otp":{"post":{"tags":["Two-factor"],"description":"Verify two factor OTP","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The otp code to verify. Eg: \"012345\""},"trustDevice":{"type":["boolean","null"]}},"required":["code"]}}}},"responses":{"200":{"description":"Two-factor OTP verified successfully","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Session token for the authenticated session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the user"},"email":{"type":"string","format":"email","nullable":true,"description":"User's email address"},"emailVerified":{"type":"boolean","nullable":true,"description":"Whether the email is verified"},"name":{"type":"string","nullable":true,"description":"User's name"},"image":{"type":"string","format":"uri","nullable":true,"description":"User's profile image URL"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the user was last updated"}},"required":["id","createdAt","updatedAt"],"description":"The authenticated user object"}},"required":["token","user"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/verify-backup-code":{"post":{"tags":["Two-factor"],"description":"Verify a backup code for two-factor authentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A backup code to verify. Eg: \"123456\""},"disableSession":{"type":["boolean","null"],"description":"If true, the session cookie will not be set."},"trustDevice":{"type":["boolean","null"],"description":"If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true"}},"required":["code"]}}}},"responses":{"200":{"description":"Backup code verified successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the user"},"email":{"type":"string","format":"email","nullable":true,"description":"User's email address"},"emailVerified":{"type":"boolean","nullable":true,"description":"Whether the email is verified"},"name":{"type":"string","nullable":true,"description":"User's name"},"image":{"type":"string","format":"uri","nullable":true,"description":"User's profile image URL"},"twoFactorEnabled":{"type":"boolean","description":"Whether two-factor authentication is enabled for the user"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the user was last updated"}},"required":["id","twoFactorEnabled","createdAt","updatedAt"],"description":"The authenticated user object with two-factor details"},"session":{"type":"object","properties":{"token":{"type":"string","description":"Session token"},"userId":{"type":"string","description":"ID of the user associated with the session"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the session was created"},"expiresAt":{"type":"string","format":"date-time","description":"Timestamp when the session expires"}},"required":["token","userId","createdAt","expiresAt"],"description":"The current session object, included unless disableSession is true"}},"required":["user","session"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/generate-backup-codes":{"post":{"tags":["Two-factor"],"description":"Generate new backup codes for two-factor authentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The users password."}},"required":["password"]}}}},"responses":{"200":{"description":"Backup codes generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the backup codes were generated successfully","enum":[true]},"backupCodes":{"type":"array","items":{"type":"string"},"description":"Array of generated backup codes in plain text"}},"required":["status","backupCodes"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/enable":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to enable two factor authentication. This will generate a TOTP URI and backup codes. Once the user verifies the TOTP URI, the two factor authentication will be enabled.","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"},"issuer":{"type":["string","null"],"description":"Custom issuer for the TOTP URI"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totpURI":{"type":"string","description":"TOTP URI"},"backupCodes":{"type":"array","items":{"type":"string"},"description":"Backup codes"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/two-factor/disable":{"post":{"tags":["Two-factor"],"description":"Use this endpoint to disable two factor authentication.","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"User password"}},"required":["password"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/generate-register-options":{"get":{"tags":["Passkey"],"description":"Generate registration options for a new passkey","operationId":"generatePasskeyRegistrationOptions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","parameters":{"query":{"authenticatorAttachment":{"description":"Type of authenticator to use for registration.\n                          \"platform\" for device-specific authenticators,\n                          \"cross-platform\" for authenticators that can be used across devices.","required":false},"name":{"description":"Optional custom name for the passkey.\n                          This can help identify the passkey when managing multiple credentials.","required":false}}},"content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string"},"rp":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"}}},"pubKeyCredParams":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"alg":{"type":"number"}}}},"timeout":{"type":"number"},"excludeCredentials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"transports":{"type":"array","items":{"type":"string"}}}}},"authenticatorSelection":{"type":"object","properties":{"authenticatorAttachment":{"type":"string"},"requireResidentKey":{"type":"boolean"},"userVerification":{"type":"string"}}},"attestation":{"type":"string"},"extensions":{"type":"object"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/generate-authenticate-options":{"get":{"tags":["Passkey"],"description":"Generate authentication options for a passkey","operationId":"passkeyGenerateAuthenticateOptions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string"},"rp":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"}}},"timeout":{"type":"number"},"allowCredentials":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"transports":{"type":"array","items":{"type":"string"}}}}},"userVerification":{"type":"string"},"authenticatorSelection":{"type":"object","properties":{"authenticatorAttachment":{"type":"string"},"requireResidentKey":{"type":"boolean"},"userVerification":{"type":"string"}}},"extensions":{"type":"object"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/verify-registration":{"post":{"tags":["Passkey"],"description":"Verify registration of a new passkey","operationId":"passkeyVerifyRegistration","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"string"},"name":{"type":["string","null"],"description":"Name of the passkey"}},"required":["response"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passkey"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/verify-authentication":{"post":{"tags":["Passkey"],"description":"Verify authentication of a passkey","operationId":"passkeyVerifyAuthentication","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"string"}},"required":["response"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/list-user-passkeys":{"get":{"tags":["Passkey"],"description":"List all passkeys for the authenticated user","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Passkeys retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passkey","required":["id","userId","publicKey","createdAt","updatedAt"]},"description":"Array of passkey objects associated with the user"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/delete-passkey":{"post":{"tags":["Passkey"],"description":"Delete a specific passkey","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the passkey to delete. Eg: \"some-passkey-id\""}},"required":["id"]}}}},"responses":{"200":{"description":"Passkey deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates whether the deletion was successful"}},"required":["status"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/passkey/update-passkey":{"post":{"tags":["Passkey"],"description":"Update a specific passkey's name","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the passkey which will be updated. Eg: \"passkey-id\""},"name":{"type":"string","description":"The new name which the passkey will be updated to. Eg: \"my-new-passkey-name\""}},"required":["id","name"]}}}},"responses":{"200":{"description":"Passkey updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"passkey":{"$ref":"#/components/schemas/Passkey"}},"required":["passkey"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"type":"string","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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","null"]},"name":{"type":"string","description":"The name of the user"},"role":{"type":["string","null"]},"data":{"type":["string","null"]}},"required":["email","name"]}}}},"responses":{"200":{"description":"User created","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/admin/update-user":{"post":{"tags":["Admin"],"description":"Update a user's details","operationId":"updateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"The user id"},"data":{"type":"string","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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/admin/list-users":{"get":{"tags":["Admin"],"description":"List users","operationId":"listUsers","security":[{"bearerAuth":[]}],"parameters":[{"name":"searchValue","in":"query","schema":{"type":["string","null"]}},{"name":"searchField","in":"query","schema":{"type":["string","null"],"description":"The field to search in, defaults to email. Can be `email` or `name`. Eg: \"name\""}},{"name":"searchOperator","in":"query","schema":{"type":["string","null"],"description":"The operator to use for the search. Can be `contains`, `starts_with` or `ends_with`. Eg: \"contains\""}},{"name":"limit","in":"query","schema":{"type":["string","null"]}},{"name":"offset","in":"query","schema":{"type":["string","null"]}},{"name":"sortBy","in":"query","schema":{"type":["string","null"],"description":"The field to sort by"}},{"name":"sortDirection","in":"query","schema":{"type":["string","null"],"description":"The direction to sort by"}},{"name":"filterField","in":"query","schema":{"type":["string","null"],"description":"The field to filter by"}},{"name":"filterValue","in":"query","schema":{"type":["string","null"]}},{"name":"filterOperator","in":"query","schema":{"type":["string","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/admin/list-user-sessions":{"post":{"tags":["Admin"],"description":"List user sessions","operationId":"listUserSessions","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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","null"],"description":"The reason for the ban"},"banExpiresIn":{"type":["number","null"],"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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/admin/stop-impersonating":{"post":{"tags":["Admin"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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","description":"The new password"},"userId":{"type":"string","description":"The user id"}},"required":["newPassword","userId"]}}}},"responses":{"200":{"description":"Password set","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/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":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/multi-session/list-device-sessions":{"get":{"tags":["Multi-session"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/multi-session/set-active":{"post":{"tags":["Multi-session"],"description":"Set the active session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionToken":{"type":"string","description":"The session token to set as active"}},"required":["sessionToken"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/multi-session/revoke":{"post":{"tags":["Multi-session"],"description":"Revoke a device session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionToken":{"type":"string","description":"The session token to revoke"}},"required":["sessionToken"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/oauth-proxy-callback":{"get":{"tags":["Oauth-proxy"],"description":"OAuth Proxy Callback","operationId":"oauthProxyCallback","security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"callbackURL","required":true,"description":"The URL to redirect to after the proxy"},{"in":"query","name":"profile","required":false,"description":"Encrypted OAuth profile data"}],"responses":{"302":{"description":"Redirect","headers":{"Location":{"description":"The URL to redirect to","schema":{"type":"string"}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api-key/create":{"post":{"tags":["Api-key"],"description":"Create a new API key for a user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":["string","null"],"description":"The configuration ID to use for the API key. If not provided, the default configuration will be used."},"name":{"type":["string","null"],"description":"Name of the Api Key"},"expiresIn":{"type":"string","default":null},"prefix":{"type":["string","null"],"description":"Prefix of the Api Key"},"remaining":{"type":"string","default":null},"metadata":{"type":["string","null"]},"refillAmount":{"type":["number","null"],"description":"Amount to refill the remaining count of the Api Key. server-only. Eg: 100"},"refillInterval":{"type":["number","null"],"description":"Interval to refill the Api Key in milliseconds. server-only. Eg: 1000"},"rateLimitTimeWindow":{"type":["number","null"],"description":"The duration in milliseconds where each request is counted. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 1000"},"rateLimitMax":{"type":["number","null"],"description":"Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100"},"rateLimitEnabled":{"type":["boolean","null"],"description":"Whether the key has rate limiting enabled. server-only. Eg: true"},"permissions":{"type":["string","null"],"description":"Permissions of the Api Key."},"userId":{"type":["string","null"],"description":"User Id of the user that the Api Key belongs to. server-only. Eg: \"user-id\""},"organizationId":{"type":["string","null"],"description":"Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'"}},"required":["expiresIn","remaining"]}}}},"responses":{"200":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the API key"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"name":{"type":"string","nullable":true,"description":"Name of the API key"},"prefix":{"type":"string","nullable":true,"description":"Prefix of the API key"},"start":{"type":"string","nullable":true,"description":"Starting characters of the key (if configured)"},"key":{"type":"string","description":"The full API key (only returned on creation)"},"enabled":{"type":"boolean","description":"Whether the key is enabled"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiration timestamp"},"referenceId":{"type":"string","description":"ID of the reference owning the key"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"Last refill timestamp"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"Last request timestamp"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Metadata associated with the key"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum requests in time window"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"Rate limit time window in milliseconds"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests"},"refillAmount":{"type":"number","nullable":true,"description":"Amount to refill"},"refillInterval":{"type":"number","nullable":true,"description":"Refill interval in milliseconds"},"rateLimitEnabled":{"type":"boolean","description":"Whether rate limiting is enabled"},"requestCount":{"type":"number","description":"Current request count in window"},"permissions":{"type":"object","nullable":true,"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Permissions associated with the key"}},"required":["id","createdAt","updatedAt","key","enabled","referenceId","rateLimitEnabled","requestCount"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api-key/get":{"get":{"tags":["Api-key"],"description":"Retrieve an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"configId","in":"query","schema":{"type":["string","null"],"description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."}},{"name":"id","in":"query","schema":{"type":"string","description":"The id of the Api Key"}}],"responses":{"200":{"description":"API key retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api-key/update":{"post":{"tags":["Api-key"],"description":"Update an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":["string","null"],"description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."},"keyId":{"type":"string","description":"The id of the Api Key"},"userId":{"type":["string","null"],"description":"The id of the user which the api key belongs to. server-only. Eg: \"some-user-id\""},"name":{"type":["string","null"],"description":"The name of the key"},"enabled":{"type":["boolean","null"],"description":"Whether the Api Key is enabled or not"},"remaining":{"type":["number","null"],"description":"The number of remaining requests"},"refillAmount":{"type":["number","null"],"description":"The refill amount"},"refillInterval":{"type":["number","null"],"description":"The refill interval"},"metadata":{"type":["string","null"]},"expiresIn":{"type":"string"},"rateLimitEnabled":{"type":["boolean","null"],"description":"Whether the key has rate limiting enabled."},"rateLimitTimeWindow":{"type":["number","null"],"description":"The duration in milliseconds where each request is counted. server-only. Eg: 1000"},"rateLimitMax":{"type":["number","null"],"description":"Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100"},"permissions":{"type":"string"}},"required":["keyId","expiresIn","permissions"]}}}},"responses":{"200":{"description":"API key updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api-key/delete":{"post":{"tags":["Api-key"],"description":"Delete an existing API key","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string","description":"The id of the API key to delete"}},"required":["keyId"]}}}},"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the API key was successfully deleted"}},"required":["success"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api-key/list":{"get":{"tags":["Api-key"],"description":"List all API keys for the authenticated user or for a specific organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API keys retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}},"total":{"type":"number","description":"Total number of API keys"},"limit":{"type":"number","nullable":true,"description":"The limit used for pagination"},"offset":{"type":"number","nullable":true,"description":"The offset used for pagination"}},"required":["apiKeys","total"]}}}},"400":{"description":"Bad Request. Usually due to missing parameters, or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/one-tap/callback":{"post":{"tags":["One-tap"],"description":"Use this endpoint to authenticate with Google One Tap","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","description":"Google ID token, which the client obtains from the One Tap API"}},"required":["idToken"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}}}}}},"400":{"description":"Invalid token"},"401":{"description":"Unauthorized. Due to missing or invalid authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"Forbidden. You do not have permission to access this resource or to perform this action.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found. The requested resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Try again later.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error. This is a problem with the server that you cannot fix.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/api/sl/register":{"post":{"summary":"Register an instance","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlRegisterBody"}}}},"responses":{"200":{"description":"Registration success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlRegisterResponse"}}}}}}},"/api/sl/instances/{id}":{"get":{"summary":"Get instance details","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK","headers":{"ETag":{"required":true,"description":"HTTP ETag for config/document versioning","schema":{"$ref":"#/components/schemas/ETag"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlInstanceDetailsResponse"}}}},"404":{"description":"Not found"}}}},"/api/sl/instances/{id}/config":{"get":{"summary":"Fetch config","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK","headers":{"ETag":{"required":true,"description":"HTTP ETag for config/document versioning","schema":{"$ref":"#/components/schemas/ETag"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlConfigResponse"}}}},"304":{"description":"Not Modified"}}},"post":{"summary":"Update config","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"},{"in":"header","name":"X-Instance-Id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"},{"in":"header","name":"X-Timestamp","schema":{"type":"string","description":"ISO8601 or UNIX ms timestamp"},"required":true,"description":"ISO8601 or UNIX ms timestamp"},{"in":"header","name":"X-Signature","schema":{"type":"string","description":"HMAC signature: hex or base64 of canonical(body, ts, token)"},"required":true,"description":"HMAC signature: hex or base64 of canonical(body, ts, token)"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlConfigUpdateBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlConfigUpdateResponse"}}}},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"}}}},"/api/sl/instances/{id}/token/rotate":{"post":{"summary":"Rotate instance token","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlTokenRotateResponse"}}}},"404":{"description":"Not found"}}}},"/api/sl/instances/{id}/snapshots/{snapshotId}/restore":{"post":{"summary":"Restore a config snapshot","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"},{"in":"path","name":"snapshotId","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"},{"in":"header","name":"X-Instance-Id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"},{"in":"header","name":"X-Timestamp","schema":{"type":"string","description":"ISO8601 or UNIX ms timestamp"},"required":true,"description":"ISO8601 or UNIX ms timestamp"},{"in":"header","name":"X-Signature","schema":{"type":"string","description":"HMAC signature: hex or base64 of canonical(body, ts, token)"},"required":true,"description":"HMAC signature: hex or base64 of canonical(body, ts, token)"}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}},"/api/sl/entitlements":{"post":{"summary":"Upsert entitlement","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlEntitlementBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlEntitlementResponse"}}}}}}},"/api/creator/master-objects":{"get":{"summary":"List master objects","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create master object","security":[{"BearerAuth":[]}],"responses":{"201":{"description":"Created"}}}},"/api/creator/master-objects/{id}":{"get":{"summary":"Get master object","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}},"put":{"summary":"Update master object","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete master object","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/creator/master-objects/{id}/versions":{"get":{"summary":"List versions","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create version","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"201":{"description":"Created"}}}},"/api/creator/instances":{"get":{"summary":"Search instances","description":"Returns instances scoped to the API key org/team/user.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/api/creator/instances/{id}/token/rotate":{"post":{"summary":"Rotate instance token (admin)","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlTokenRotateResponse"}}}},"404":{"description":"Not found"}}}},"/api/creator/instances/{id}/token/revoke":{"post":{"summary":"Revoke instance token (admin)","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/creator/webhooks":{"get":{"summary":"List webhooks","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create webhook","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","minLength":8},"scopeType":{"type":"string","enum":["org","team","user"]},"scopeId":{"$ref":"#/components/schemas/SlUuid"}},"required":["targetUrl","events","secret"]}}}},"responses":{"201":{"description":"Created"}}}},"/api/creator/webhooks/{id}":{"put":{"summary":"Update webhook","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","minLength":8},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete webhook","security":[{"BearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/SlUuid"},"required":true,"description":"UUID v4 string"}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/creator/webhooks/test":{"post":{"summary":"Test webhook delivery","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"event":{"type":"string"},"payload":{}},"required":["url"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"}}}},"/api/creator/apikeys":{"get":{"summary":"List API keys","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Create API key","security":[{"BearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"scopes":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}}}},"responses":{"201":{"description":"Created"}}},"delete":{"summary":"Delete API key","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"SlRegisterBody":{"type":"object","properties":{"masterObjectId":{"$ref":"#/components/schemas/SlUuid"},"ownerUuid":{"$ref":"#/components/schemas/SlUuid"},"version":{"$ref":"#/components/schemas/Version"},"region":{"type":"string"},"fingerprint":{"$ref":"#/components/schemas/SlFingerprint"}},"required":["masterObjectId","ownerUuid"]},"SlUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUID v4 string","example":"550e8400-e29b-41d4-a716-446655440000"},"Version":{"type":"integer","minimum":0,"maximum":9007199254740991,"example":1},"SlFingerprint":{"type":"object","properties":{"objectId":{"type":"string"},"scriptKey":{"type":"string"},"inventoryHash":{"type":"string"},"productSku":{"type":"string"},"vendor":{"type":"string"}},"description":"Best-effort identifiers to reduce spoofing and correlate deliveries"},"SlConfigUpdateBody":{"type":"object","properties":{"config":{},"versionTag":{"type":"string"}},"required":["config"]},"SlEntitlementBody":{"type":"object","properties":{"ownerUuid":{"$ref":"#/components/schemas/SlUuid"},"masterObjectId":{"$ref":"#/components/schemas/SlUuid"},"source":{"type":"string","enum":["marketplace","inworld"],"example":"inworld"},"proofRef":{"type":"string"}},"required":["ownerUuid","masterObjectId","source"]},"SlRegisterResponse":{"type":"object","properties":{"instanceId":{"$ref":"#/components/schemas/SlUuid"},"token":{"type":"string","minLength":16},"tokenExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"defaultConfig":{},"etag":{"$ref":"#/components/schemas/ETag"}},"required":["instanceId","token","tokenExpiresAt"],"additionalProperties":false},"ETag":{"type":"string","minLength":1,"description":"HTTP ETag for config/document versioning","example":"\"b3f1b2c1\""},"SlInstanceDetailsResponse":{"type":"object","properties":{"instanceId":{"$ref":"#/components/schemas/SlUuid"},"masterObjectId":{"$ref":"#/components/schemas/SlUuid"},"status":{"default":"active","type":"string","enum":["active","revoked","suspended"]},"version":{"$ref":"#/components/schemas/Version"},"lastSeenAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"etag":{"$ref":"#/components/schemas/ETag"},"activeConfigId":{"$ref":"#/components/schemas/SlUuid"}},"required":["instanceId","masterObjectId","status","version","lastSeenAt"],"additionalProperties":false},"SlConfigResponse":{"type":"object","properties":{"instanceId":{"$ref":"#/components/schemas/SlUuid"},"config":{},"etag":{"$ref":"#/components/schemas/ETag"},"version":{"$ref":"#/components/schemas/Version"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["instanceId","config","etag","version","updatedAt"],"additionalProperties":false},"SlConfigUpdateResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true},"activeConfigId":{"$ref":"#/components/schemas/SlUuid"},"etag":{"$ref":"#/components/schemas/ETag"}},"required":["success","activeConfigId","etag"],"additionalProperties":false},"SlTokenRotateResponse":{"type":"object","properties":{"token":{"type":"string","minLength":16},"tokenExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["token","tokenExpiresAt"],"additionalProperties":false},"SlEntitlementResponse":{"type":"object","properties":{"ok":{"default":true,"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}}}}